summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-05-04 23:39:37 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-05-04 23:39:37 +0300
commit1c82a80b2e48167ba718b6b79d51135cc7e7b371 (patch)
treecc8a5b339116a317d8329d34ee162d6a80ab013b /indra/llwindow/llwindowwin32.cpp
parentf4c7c8aff55d0cd8f044d5b7c8cddb2be750dde5 (diff)
parent4a7fd0117a43dca9e30c58c6417ebdf6862561f6 (diff)
Merge branch 'master' into DRTVWR-486
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 3c69aa98c4..0b3936f8a5 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -741,17 +741,27 @@ void LLWindowWin32::restore()
SetFocus(mWindowHandle);
}
+// See SL-12170
+// According to callstack "c0000005 Access violation" happened inside __try block,
+// deep in DestroyWindow and crashed viewer, which shouldn't be possible.
+// I tried manually causing this exception and it was caught without issues, so
+// I'm turning off optimizations for this part to be sure code executes as intended
+// (it is a straw, but I have no idea why else __try can get overruled)
+#pragma optimize("", off)
bool destroy_window_handler(HWND &hWnd)
{
+ bool res;
__try
{
- return DestroyWindow(hWnd);
+ res = DestroyWindow(hWnd);
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
- return false;
+ res = false;
}
+ return res;
}
+#pragma optimize("", on)
// close() destroys all OS-specific code associated with a window.
// Usually called from LLWindowManager::destroyWindow()