From: Tobias Markus Date: Sun, 25 Aug 2013 02:12:25 +0000 (+0200) Subject: [bug 952 partial] Free mouse cursor surface before shutdown X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=56b51eb2383b2ef02acd58e4b6e1b8fae682da97;p=supertux.git [bug 952 partial] Free mouse cursor surface before shutdown --- diff --git a/src/gui/mousecursor.hpp b/src/gui/mousecursor.hpp index 7e4d3b33c..30afd5655 100644 --- a/src/gui/mousecursor.hpp +++ b/src/gui/mousecursor.hpp @@ -63,6 +63,8 @@ public: /// Set current cursor. static void set_current(MouseCursor* pcursor) { current_ = pcursor; }; + + friend class Resources; private: int mid_x; diff --git a/src/supertux/resources.cpp b/src/supertux/resources.cpp index 0b09aa57e..2d5224b53 100644 --- a/src/supertux/resources.cpp +++ b/src/supertux/resources.cpp @@ -82,6 +82,7 @@ Resources::unload_shared() sprite_manager = NULL; /* Free mouse-cursor */ + mouse_cursor->cursor.reset(); delete mouse_cursor; }