Put in some checks for null. This can happen when we are canceling updating part way through.
Put in some checks for null. This can happen when we are canceling updating part way through.

mmoening/agg-sharp,MatterHackers/agg-sharp,larsbrubaker/agg-sharp,mmoening/agg-sharp,jlewin/agg-sharp,mmoening/agg-sharp,LayoutFarm/PixelFarm