Module: wine Branch: master Commit: 90608c8ce633cd79dffd45d02b32fe16e615f4fa URL: http://source.winehq.org/git/wine.git/?a=commit;h=90608c8ce633cd79dffd45d02b...
Author: Matteo Bruni mbruni@codeweavers.com Date: Thu Mar 17 22:51:04 2011 +0100
winex11.drv: Don't call glXSwapBuffers if the context or the drawable are invalid.
---
dlls/winex11.drv/opengl.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 81979ae..a7ec8c8 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3818,6 +3818,20 @@ BOOL CDECL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev)
TRACE("(%p)\n", physDev);
+ if (!ctx) + { + WARN("Using a NULL context, skipping\n"); + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (!physDev->current_pf) + { + WARN("Using an invalid drawable, skipping\n"); + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + drawable = get_glxdrawable(physDev);
wine_tsx11_lock();