summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-04-16 13:30:51 -0700
committerRichard Linden <none@none>2010-04-16 13:30:51 -0700
commit9b6da49ef5d5673015dea0744bbe1adeb9380f52 (patch)
tree0c88c355e4582693c2e910d58ba33ffd1a013cf1 /indra
parent814ca2ad1e26e7334c48e6071e292e09ac06b525 (diff)
EXT-6895 - Crash in landmarkNameCallback
reviewed by Leyla
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfavoritesbar.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index bf7c735488..959395ff82 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -75,7 +75,9 @@ public:
mPosY(0),
mPosZ(0),
mLoaded(false)
- {}
+ {
+ mHandle.bind(this);
+ }
void setLandmarkID(const LLUUID& id) { mLandmarkID = id; }
const LLUUID& getLandmarkId() const { return mLandmarkID; }
@@ -122,17 +124,21 @@ private:
if(LLLandmarkActions::getLandmarkGlobalPos(mLandmarkID, g_pos))
{
LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(g_pos,
- boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, this, _1, _2, _3, _4));
+ boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, static_cast<LLHandle<LLLandmarkInfoGetter> >(mHandle), _1, _2, _3, _4));
}
}
- void landmarkNameCallback(const std::string& name, S32 x, S32 y, S32 z)
+ static void landmarkNameCallback(LLHandle<LLLandmarkInfoGetter> handle, const std::string& name, S32 x, S32 y, S32 z)
{
- mPosX = x;
- mPosY = y;
- mPosZ = z;
- mName = name;
- mLoaded = true;
+ LLLandmarkInfoGetter* getter = handle.get();
+ if (getter)
+ {
+ getter->mPosX = x;
+ getter->mPosY = y;
+ getter->mPosZ = z;
+ getter->mName = name;
+ getter->mLoaded = true;
+ }
}
LLUUID mLandmarkID;
@@ -141,6 +147,7 @@ private:
S32 mPosY;
S32 mPosZ;
bool mLoaded;
+ LLRootHandle<LLLandmarkInfoGetter> mHandle;
};
/**