diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-08-30 19:26:33 +0200 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-08-30 15:19:58 -0600 |
commit | f63a221850062da5b676c7dce258405f59486530 (patch) | |
tree | dd5d733a4b264a69489f80fe834a1f334afb0101 /src | |
parent | d55c1345449a34adb3192c23fe3760bd0aae645b (diff) | |
download | mana-client-f63a221850062da5b676c7dce258405f59486530.tar.gz mana-client-f63a221850062da5b676c7dce258405f59486530.tar.bz2 mana-client-f63a221850062da5b676c7dce258405f59486530.tar.xz mana-client-f63a221850062da5b676c7dce258405f59486530.zip |
Fixing segmentation fault and making invite to guild in pop-up conditional
How to reproduce the segmentation fault: Open the emote pop-up. Then
press the escape key and switch the character. The emote pop-up is
still open and clicking on it makes the game crash.
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/popupmenu.cpp | 3 | ||||
-rw-r--r-- | src/gui/windowmenu.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 520b4005..01870e62 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -128,7 +128,8 @@ void PopupMenu::showPopup(int x, int y, Being *being) mBrowserBox->addRow(strprintf("@@follow|%s@@", strprintf(_("Follow %s"), name.c_str()).c_str())); - mBrowserBox->addRow(strprintf("@@guild|%s@@", + if (player_node->getNumberOfGuilds()) + mBrowserBox->addRow(strprintf("@@guild|%s@@", strprintf(_("Invite %s to join your guild"), name.c_str()).c_str())); if (player_node->isInParty()) diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index 5af5a202..4b18de89 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -72,6 +72,7 @@ WindowMenu::WindowMenu(): WindowMenu::~WindowMenu() { + delete mEmotePopup; } void WindowMenu::action(const gcn::ActionEvent &event) |