MAINT-1139 Catch Windows crash on Saving snapshot

andreykproductengine 2017-05-26 15:11:37 +03:00
parent bb8609fa94
commit fe49c1e8a5
1 changed files with 11 additions and 4 deletions

View File

@ -544,11 +544,18 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
send_agent_pause();
{
// NOTA BENE: hitting the file dialog triggers a window focus event, destroying the selection manager!!
success = GetSaveFileName(&mOFN);
if (success)
try
{
std::string filename = utf16str_to_utf8str(llutf16string(mFilesW));
mFiles.push_back(filename);
success = GetSaveFileName(&mOFN);
if (success)
{
std::string filename = utf16str_to_utf8str(llutf16string(mFilesW));
mFiles.push_back(filename);
}
}
catch (...)
{
LOG_UNHANDLED_EXCEPTION("");
}
gKeyboard->resetKeys();
}