From 24d29f88e6e8a28177d404bfa3ed87896bdd7a1f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 12 Jun 2010 20:38:40 +0300 Subject: Fix memory leak in socialwindow.cpp. Signed-off-by: Jared Adams --- src/gui/socialwindow.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 468a94c4..4f3bb6e5 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -63,7 +63,7 @@ protected: mConfirmDialog(NULL) {} - ~SocialTab() + virtual ~SocialTab() { // Cleanup dialogs if (mInviteDialog) @@ -108,6 +108,14 @@ public: mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS); } + ~GuildTab() + { + delete mList; + mList = 0; + delete mScroll; + mScroll = 0; + } + void action(const gcn::ActionEvent &event) { if (event.getId() == "do invite") @@ -181,6 +189,14 @@ public: mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS); } + ~PartyTab() + { + delete mList; + mList = 0; + delete mScroll; + mScroll = 0; + } + void action(const gcn::ActionEvent &event) { if (event.getId() == "do invite") -- cgit v1.2.3-70-g09d2