summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2024-04-07 22:33:45 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-09 17:48:28 +0200
commit8002e7247e0668bb4a3b3bdded15076ad60add9b (patch)
treeb4a657c7427d323a3cd0a6502738b67c993f9f1d
parent6101c30189e979a97d07a9bdd7274e8a4ca403a8 (diff)
downloadmana-8002e7247e0668bb4a3b3bdded15076ad60add9b.tar.gz
mana-8002e7247e0668bb4a3b3bdded15076ad60add9b.tar.bz2
mana-8002e7247e0668bb4a3b3bdded15076ad60add9b.tar.xz
mana-8002e7247e0668bb4a3b3bdded15076ad60add9b.zip
Clean up tab at exit
-rw-r--r--src/gui/socialwindow.cpp3
-rw-r--r--src/gui/socialwindow.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index f15140ff..68940803 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -365,7 +365,7 @@ SocialWindow::SocialWindow() :
mCreatePopup = new CreatePopup();
- auto *tab = new PlayerListTab();
+ mPlayerListTab = new PlayerListTab();
mTabs->addTab(tab, tab->mScroll.get());
if (local_player->getParty())
@@ -397,6 +397,7 @@ SocialWindow::~SocialWindow()
mPartyInviter.clear();
}
delete mCreatePopup;
+ delete mPlayerListTab;
}
bool SocialWindow::addTab(Guild *guild)
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h
index 8575f3b2..29c21f98 100644
--- a/src/gui/socialwindow.h
+++ b/src/gui/socialwindow.h
@@ -34,6 +34,7 @@ class ConfirmDialog;
class CreatePopup;
class Guild;
class Party;
+class PlayerListTab;
class SocialTab;
class Tab;
class TabbedArea;
@@ -92,6 +93,8 @@ protected:
CreatePopup *mCreatePopup;
+ PlayerListTab *mPlayerListTab;
+
Button *mCreateButton;
Button *mInviteButton;
Button *mLeaveButton;