Fixes bug when preparing file without viewports

In files without a default view (relatively rare), this fixes a bug
where we would be trying to create a ViewInfo from a null view.