perhaps use a camera reference? - m_camera is used multiple times without check for nullptr