diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-25 01:31:44 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-01-25 19:02:57 +0200 |
commit | 5c7903bfdc4b37bac04631b921273c5e4c0d297a (patch) | |
tree | 6f450f7181d46945887470d8520d95f5aef3af24 /indra/llwindow | |
parent | 56a9322569c3e36e68f47b6b5e4e488c917e9e26 (diff) |
Crash in switch context
Looks like a crash at SetWindowLongPtr due to handle being zero
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 99a11f772b..721dadc923 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1671,7 +1671,9 @@ const S32 max_format = (S32)num_formats - 1; } else { - LL_WARNS("Window") << "No wgl_ARB_pixel_format extension, using default ChoosePixelFormat!" << LL_ENDL; + LLError::LLUserWarningMsg::show(mCallbacks->translateString("MBVideoDrvErr")); + // mWindowHandle is 0, going to crash either way + LL_ERRS("Window") << "No wgl_ARB_pixel_format extension!" << LL_ENDL; } // Verify what pixel format we actually received. @@ -1924,12 +1926,16 @@ void LLWindowWin32::destroySharedContext(void* contextPtr) void LLWindowWin32::toggleVSync(bool enable_vsync) { - if (!enable_vsync && wglSwapIntervalEXT) + if (wglSwapIntervalEXT == nullptr) + { + LL_INFOS("Window") << "VSync: wglSwapIntervalEXT not initialized" << LL_ENDL; + } + else if (!enable_vsync) { LL_INFOS("Window") << "Disabling vertical sync" << LL_ENDL; wglSwapIntervalEXT(0); } - else if (wglSwapIntervalEXT) + else { LL_INFOS("Window") << "Enabling vertical sync" << LL_ENDL; wglSwapIntervalEXT(1); |