From 0a95344a01997bd4db72b4ba1ac70cd5d45b7ead Mon Sep 17 00:00:00 2001 From: Marianne Gagnon Date: Thu, 14 Aug 2014 19:54:35 -0400 Subject: [PATCH] Fix potentiel crash --- src/graphics/camera.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/graphics/camera.cpp b/src/graphics/camera.cpp index 8f6d6d956..547add4f9 100644 --- a/src/graphics/camera.cpp +++ b/src/graphics/camera.cpp @@ -94,6 +94,9 @@ Camera::~Camera() { if(m_rain) delete m_rain; irr_driver->removeCameraSceneNode(m_camera); + + if (s_active_camera == this) + s_active_camera = NULL; } // ~Camera //-----------------------------------------------------------------------------