From 703a3c4df3732e3e88559147001260f3355d42d6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 9 Sep 2011 22:10:53 +0300 Subject: Continue fix for shadow variables/methods errors. --- src/gui/popupmenu.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/gui/popupmenu.cpp') 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_")) -- cgit v1.2.3-70-g09d2