wgl: Only reset GL context on the dummy window.

This changes the WGL context destruction code to only reset the GL
context for the dummy window, since doing it on <nothing> is an
invalid operation.
This commit is contained in:
Zoxc 2010-06-16 21:33:30 +02:00 committed by Chris Wilson
parent ca35e09ece
commit a9a22649e2

View file

@ -129,13 +129,11 @@ _wgl_destroy (void *abstract_ctx)
{
cairo_wgl_context_t *ctx = abstract_ctx;
if (ctx->dummy_dc != 0) {
if (ctx->dummy_dc != 0) {
wglMakeCurrent (ctx->dummy_dc, 0);
ReleaseDC (ctx->dummy_wnd, ctx->dummy_dc);
DestroyWindow (ctx->dummy_wnd);
CloseHandle (ctx->dummy_wnd);
}
wglMakeCurrent (0, 0);
}
static cairo_status_t