Prevent crash on exit.
authorWolfgang Becker <uafr@gmx.de>
Thu, 28 Aug 2008 21:24:03 +0000 (21:24 +0000)
committerWolfgang Becker <uafr@gmx.de>
Thu, 28 Aug 2008 21:24:03 +0000 (21:24 +0000)
SVN-Revision: 5755

src/video/gl_lightmap.cpp

index b58f66a..9287bec 100644 (file)
@@ -152,7 +152,9 @@ namespace GL
 
   Lightmap::~Lightmap()
   {
-    texture_manager->remove_texture(lightmap);
+    if(texture_manager){
+      texture_manager->remove_texture(lightmap);
+    }
     delete lightmap;
   }