Fixed crash when deallocating the camera while the session is running.