mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Don't call into SwapBuffers if no window is associated with the DC
This commit is contained in:
@@ -523,12 +523,15 @@ class OpenGLHook : LibraryHook
|
||||
{
|
||||
HWND w = WindowFromDC(dc);
|
||||
|
||||
RECT r;
|
||||
GetClientRect(w, &r);
|
||||
if(w != NULL)
|
||||
{
|
||||
RECT r;
|
||||
GetClientRect(w, &r);
|
||||
|
||||
glhooks.GetDriver()->WindowSize(w, r.right-r.left, r.bottom-r.top);
|
||||
glhooks.GetDriver()->WindowSize(w, r.right - r.left, r.bottom - r.top);
|
||||
|
||||
glhooks.GetDriver()->SwapBuffers(w);
|
||||
glhooks.GetDriver()->SwapBuffers(w);
|
||||
}
|
||||
|
||||
return glhooks.SwapBuffers_hook()(dc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user