summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2020-11-18 21:09:57 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2020-11-18 21:09:57 +0200
commit12d2bf47865559a8da087f6e3bbb4b65d421169c (patch)
tree9c210aad081f40d7601faba8601aadf8ba6d4ab5 /indra/newview
parent1416c4d5c20f90f40093bd6b5a2b41414eaee54d (diff)
SL-14286 fixed crash when closing viewer while file picker is open
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappdelegate-objc.mm1
-rw-r--r--indra/newview/llfloatermodelpreview.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index a2b7362608..3f1b5139c5 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -134,6 +134,7 @@
// called again. Since it returned false, do not yet cancel
// frameTimer.
handleQuit();
+ [[NSApplication sharedApplication] stopModal];
return NSTerminateCancel;
} else {
// pumpMainLoop() returned true: it's done. Okay, done with frameTimer.
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index b9c03f66a3..999e4a9582 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -103,6 +103,11 @@ LLMeshFilePicker::LLMeshFilePicker(LLModelPreview* mp, S32 lod)
void LLMeshFilePicker::notify(const std::vector<std::string>& filenames)
{
+ if(LLAppViewer::instance()->quitRequested())
+ {
+ return;
+ }
+
if (filenames.size() > 0)
{
mMP->loadModel(filenames[0], mLOD);