]> git.mxchange.org Git - simgear.git/blobdiff - simgear/screen/texture.hxx
A couple more sanity checking tweaks for texture freeing.
[simgear.git] / simgear / screen / texture.hxx
index 7a947429e207d09e51a8c2e8d2808ba0e9cb74c4..083c6036d47f57861e569c3b95f7b4f78feadf3b 100644 (file)
@@ -67,6 +67,7 @@ protected:
 #else
         glDeleteTexturesEXT(1, &texture_id);
 #endif
+        texture_id = -1;
     }
 
 
@@ -111,6 +112,7 @@ public:
                       GL_RGB, GL_UNSIGNED_BYTE, texture_data );
 
         delete texture_data;
+        texture_data = 0;
     }
 
     // Nowhere does it say that resident textures have to be in video memory!