diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-03-21 18:58:11 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-03-21 18:58:11 +0200 |
commit | ec9a70de94a3123142de1a1765968185846a8e17 (patch) | |
tree | fd0b60db9594c569e3647f2a18f47712cec301eb | |
parent | c2642f3b441cc2e7932ded0f73e7426705cd4e04 (diff) |
SL-10648 Handling for Window crash on exit
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 504c1589b0..a24f168ab1 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -738,6 +738,17 @@ void LLWindowWin32::restore() SetFocus(mWindowHandle); } +bool destroy_window_handler(HWND &hWnd) +{ + __try + { + return DestroyWindow(hWnd); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + return false; + } +} // close() destroys all OS-specific code associated with a window. // Usually called from LLWindowManager::destroyWindow() @@ -811,7 +822,7 @@ void LLWindowWin32::close() ShowWindow(mWindowHandle, SW_HIDE); // This causes WM_DESTROY to be sent *immediately* - if (!DestroyWindow(mWindowHandle)) + if (!destroy_window_handler(mWindowHandle)) { OSMessageBox(mCallbacks->translateString("MBDestroyWinFailed"), mCallbacks->translateString("MBShutdownErr"), |