summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 985bd79d13..e05f507506 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -741,6 +741,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()
@@ -814,7 +825,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"),