Fixing Null Reference exception in Effect.GraphicsDeviceResetting()