From e469ab2f1940cb04b53bb3b72cc7b5a0cd0669b0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Aug 2016 18:51:15 +0300 Subject: Add some clang fixes. --- src/gui/gui.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/gui/gui.cpp') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index f0a4137c1..410891416 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -275,7 +275,10 @@ Gui::~Gui() if (windowContainer) windowContainer->slowLogic(); - delete getTop(); + Widget *top = mTop; + if (Widget::widgetExists(mTop)) + setTop(nullptr); + delete top; delete2(mGuiFont); delete2(boldFont); @@ -283,14 +286,9 @@ Gui::~Gui() delete2(mSecureFont); delete2(mInfoParticleFont); delete2(mNpcFont); - delete2(guiInput); - delete2(theme); - if (Widget::widgetExists(mTop)) - setTop(nullptr); - delete2(mFocusHandler); Label::finalCleanup(); Tab::finalCleanup(); -- cgit v1.2.3-70-g09d2