From e46f66ff31607d7580be3cae3fef9d070b9ba0d0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 25 Aug 2017 17:02:33 +0300 Subject: MAINT-7752 FIXED Crash in LLPreviewNotecard::handleSaveChangesDialog --- indra/newview/llpreviewnotecard.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpreviewnotecard.cpp') diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 510d91839d..850c3b350d 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -153,9 +153,12 @@ BOOL LLPreviewNotecard::canClose() } else { - // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2)); - + if(!mSaveDialogShown) + { + mSaveDialogShown = TRUE; + // Bring up view-modal dialog: Save changes? Yes, No, Cancel + LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2)); + } return FALSE; } } @@ -639,6 +642,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response) { + mSaveDialogShown = FALSE; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch(option) { -- cgit v1.2.3