diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-09 22:10:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-09 22:11:30 +0300 |
commit | 703a3c4df3732e3e88559147001260f3355d42d6 (patch) | |
tree | fcaf8919cf734429374e4bb9a83b2b4a33835d1d /src/gui/popupmenu.cpp | |
parent | 3a875a0026936d4bcb3bd1c2b6e8ac547cd5e27e (diff) | |
download | manaverse-703a3c4df3732e3e88559147001260f3355d42d6.tar.gz manaverse-703a3c4df3732e3e88559147001260f3355d42d6.tar.bz2 manaverse-703a3c4df3732e3e88559147001260f3355d42d6.tar.xz manaverse-703a3c4df3732e3e88559147001260f3355d42d6.zip |
Continue fix for shadow variables/methods errors.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 7e43c9954..e43ab35bc 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -879,7 +879,7 @@ void PopupMenu::handleLink(const std::string &link, } else if (link == "heal" && being && being->getType() != Being::MONSTER) { - actorSpriteManager->heal(player_node, being); + actorSpriteManager->heal(being); } else if (link == "unignore" && being && being->getType() == ActorSprite::PLAYER) @@ -1591,12 +1591,15 @@ void PopupMenu::handleLink(const std::string &link, } else if (!link.compare(0, 7, "player_")) { - mBeingId = atoi(link.substr(7).c_str()); - Being *being = actorSpriteManager->findBeing(mBeingId); - if (being) + if (actorSpriteManager) { - showPopup(getX(), getY(), being); - return; + mBeingId = atoi(link.substr(7).c_str()); + being = actorSpriteManager->findBeing(mBeingId); + if (being) + { + showPopup(getX(), getY(), being); + return; + } } } else if (!link.compare(0, 12, "hide button_")) |