From 63d4e6e2ecdcbd799d6ce28a7eab55640247277a 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(-) 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 af4b8d8..0b5b381 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -913,7 +913,8 @@ void open_offer(const std::vector& items, const std::string& from_name) open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), LLUUID::null, show_keep_discard, LLUUID::null, FALSE); 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