Update use_shading, use_camera and the shading system pointers in the same location, so that when the render is interrupted they are in a consistent state. The added null pointer checks are not strictly needed, but just in case it goes out of sync for another reason. Pull Request: https://projects.blender.org/blender/blender/pulls/143467