Commit 90608c8c authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

winex11.drv: Don't call glXSwapBuffers if the context or the drawable are invalid.

parent 1902e1cb
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment