[bug 952 partial] Free mouse cursor surface before shutdown
authorTobias Markus <tobbi@mozilla-uk.org>
Sun, 25 Aug 2013 02:12:25 +0000 (04:12 +0200)
committerTobias Markus <tobbi@mozilla-uk.org>
Sun, 25 Aug 2013 02:13:28 +0000 (04:13 +0200)
src/gui/mousecursor.hpp
src/supertux/resources.cpp

index 7e4d3b3..30afd56 100644 (file)
@@ -63,6 +63,8 @@ public:
   /// Set current cursor.
   static void set_current(MouseCursor* pcursor)
   {        current_ = pcursor;      };
+  
+  friend class Resources;
 
 private:
   int mid_x;
index 0b09aa5..2d5224b 100644 (file)
@@ -82,6 +82,7 @@ Resources::unload_shared()
   sprite_manager = NULL;
 
   /* Free mouse-cursor */
+  mouse_cursor->cursor.reset();
   delete mouse_cursor;
 }