It's possible that m_scene == nullptr here (see default constructor). This should be checked before calling delete.