Check the view is not null before using it
Check the view is not null before using it

This can happen when there is a render view, but the active view is at
waiting to be created as no choice was made. Thanks to Cory Quammen for
pointing this out in review.

mathturtle/tomviz,cjh1/tomviz,cryos/tomviz,mathturtle/tomviz,thewtex/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,cjh1/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,thewtex/tomviz,cryos/tomviz,thewtex/tomviz,cryos/tomviz,cjh1/tomviz,OpenChemistry/tomviz