summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2017-08-25 17:02:33 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2017-08-25 17:02:33 +0300
commite46f66ff31607d7580be3cae3fef9d070b9ba0d0 (patch)
tree22b3682b60dc469e166ca106322f3114e67dbf94 /indra/newview/llpreviewscript.cpp
parentcbd4c0196fc32f94c6f9a41d161b65f4609985d4 (diff)
MAINT-7752 FIXED Crash in LLPreviewNotecard::handleSaveChangesDialog
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r--indra/newview/llpreviewscript.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 3c5e2544bb..2476b6d6ed 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -376,7 +376,8 @@ LLScriptEdCore::LLScriptEdCore(
mLive(live),
mContainer(container),
mHasScriptData(FALSE),
- mScriptRemoved(FALSE)
+ mScriptRemoved(FALSE),
+ mSaveDialogShown(FALSE)
{
setFollowsAll();
setBorderVisible(FALSE);
@@ -855,8 +856,12 @@ BOOL LLScriptEdCore::canClose()
}
else
{
- // Bring up view-modal dialog: Save changes? Yes, No, Cancel
- LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::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(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
+ }
return FALSE;
}
}
@@ -869,6 +874,7 @@ void LLScriptEdCore::setEnableEditing(bool enable)
bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response )
{
+ mSaveDialogShown = FALSE;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch( option )
{