Add null reference check to PrepareViewports

If the ModelFile contains no views, we can wind up with an
IndexOutOfRange exception, so we must check for null on before setting
the DefaultView.