diff options
Diffstat (limited to 'src/gui/widgets/button.cpp')
-rw-r--r-- | src/gui/widgets/button.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index ba789f2c5..15b4abdc2 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -191,6 +191,12 @@ Button::~Button() { mInstances--; + if (mInstances == 0 && Theme::instance()) + { + Theme *theme = Theme::instance(); + for (int mode = 0; mode < BUTTON_COUNT; mode ++) + theme->unloadRect(button[mode]); + } delete mVertexes; mVertexes = nullptr; if (mImageSet) |