diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-24 14:39:39 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-24 14:39:39 -0500 |
commit | c812c616ea0ba6531b3fe7f75efc815081cd0c2e (patch) | |
tree | 2d966b5ba9fae58a3369055fadd6192b417c7f46 /indra/newview/lllandmarkactions.cpp | |
parent | fc6cfc27bec61ac1f66c1304cc7b54f19157584e (diff) | |
parent | a22bb00530bb779d8e5bb40b68e55767604d88dc (diff) |
merge
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/lllandmarkactions.cpp')
-rw-r--r-- | indra/newview/lllandmarkactions.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 003afafa87..d50b68b624 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -374,22 +374,34 @@ void LLLandmarkActions::onRegionResponseNameAndCoords(region_name_and_coords_cal bool LLLandmarkActions::getLandmarkGlobalPos(const LLUUID& landmarkInventoryItemID, LLVector3d& posGlobal) { - LLLandmark* landmark = LLLandmarkActions::getLandmark(landmarkInventoryItemID); + LLViewerInventoryItem* item = gInventory.getItem(landmarkInventoryItemID); + if (NULL == item) + return false; + + const LLUUID& asset_id = item->getAssetUUID(); + LLLandmark* landmark = gLandmarkList.getAsset(asset_id, NULL); if (NULL == landmark) return false; return landmark->getGlobalPos(posGlobal); } -LLLandmark* LLLandmarkActions::getLandmark(const LLUUID& landmarkInventoryItemID) +LLLandmark* LLLandmarkActions::getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb) { LLViewerInventoryItem* item = gInventory.getItem(landmarkInventoryItemID); if (NULL == item) return NULL; const LLUUID& asset_id = item->getAssetUUID(); - return gLandmarkList.getAsset(asset_id, NULL); + + LLLandmark* landmark = gLandmarkList.getAsset(asset_id, cb); + if (landmark) + { + return landmark; + } + + return NULL; } void LLLandmarkActions::copySLURLtoClipboard(const LLUUID& landmarkInventoryItemID) |