summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2020-05-06 09:43:25 -0700
committerPtolemy <ptolemy@lindenlab.com>2020-05-06 09:43:25 -0700
commitcabbc19e95707400a7632498296cc1012b34bb0f (patch)
tree00a1fc15e9fd2c2ee742951967cf37eff22ee47a /indra/llwindow/llwindowwin32.cpp
parent7bf2a1f5fef557e4531731c608c8dd924c97bc39 (diff)
parent7449f4b6d770be9d56ee5fa3d20b6b59d816719c (diff)
DRTVWR-510: Fix merge conflict
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 4a13c73c8c..de83efb8a3 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -772,17 +772,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()