From dfc0367087c2948d745bfc6397641326b0f56854 Mon Sep 17 00:00:00 2001 From: elektrahesse Date: Thu, 30 Sep 2010 02:06:41 +0200 Subject: Fix for "about landmark" crash when invoking it on a freshly received landmark. --- linden/indra/newview/llpreviewlandmark.cpp | 4 +++- linden/indra/newview/llviewermessage.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llpreviewlandmark.cpp b/linden/indra/newview/llpreviewlandmark.cpp index 07addad..a8a510f 100644 --- a/linden/indra/newview/llpreviewlandmark.cpp +++ b/linden/indra/newview/llpreviewlandmark.cpp @@ -89,10 +89,12 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name, inv_item), mLandmark( NULL ) { - mFactoryMap["place_details_panel"] = LLCallbackMap(LLPreviewLandmark::createPlaceDetail, this); if (show_keep_discard) { + // Move the notification in llviewermessage in the if/else there please. + // This class is no more called if show_keep_discard != TRUE -- Ele + // Decided against this, a text notification is a better fix for this -- McCabe //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_new_landmark.xml", &getFactoryMap()); //childSetAction("Discard btn",onDiscardBtn,this); diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 35fd395..8fa0f64 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -922,7 +922,8 @@ void open_offer(const std::vector& items, const std::string& from_name) } break; case LLAssetType::AT_LANDMARK: - open_landmark((LLViewerInventoryItem*)item, std::string("Landmark: ") + item->getName(), show_keep_discard, LLUUID::null, FALSE); + if (!show_keep_discard) + open_landmark((LLViewerInventoryItem*)item, std::string("Landmark: ") + item->getName(), FALSE, LLUUID::null, FALSE); break; case LLAssetType::AT_TEXTURE: open_texture(*it, std::string("Texture: ") + item->getName(), show_keep_discard, LLUUID::null, FALSE); -- cgit v1.1