Commit 2a0b18dc authored by Raphael Junqueira's avatar Raphael Junqueira Committed by Alexandre Julliard

Fixed crash in wglShareList.

parent f9fef851
...@@ -560,7 +560,7 @@ BOOL WINAPI wglShareLists(HGLRC hglrc1, ...@@ -560,7 +560,7 @@ BOOL WINAPI wglShareLists(HGLRC hglrc1,
TRACE("(%p, %p)\n", org, dest); TRACE("(%p, %p)\n", org, dest);
if (dest->ctx != NULL) { if (NULL != dest && dest->ctx != NULL) {
ERR("Could not share display lists, context already created !\n"); ERR("Could not share display lists, context already created !\n");
return FALSE; return FALSE;
} else { } else {
...@@ -570,15 +570,16 @@ BOOL WINAPI wglShareLists(HGLRC hglrc1, ...@@ -570,15 +570,16 @@ BOOL WINAPI wglShareLists(HGLRC hglrc1,
LEAVE_GL(); LEAVE_GL();
TRACE(" created a delayed OpenGL context (%p) for Wine context %p\n", org->ctx, org); TRACE(" created a delayed OpenGL context (%p) for Wine context %p\n", org->ctx, org);
} }
if (NULL != dest) {
ENTER_GL(); ENTER_GL();
/* Create the destination context with display lists shared */ /* Create the destination context with display lists shared */
dest->ctx = glXCreateContext(org->display, dest->vis, org->ctx, True); dest->ctx = glXCreateContext(org->display, dest->vis, org->ctx, True);
LEAVE_GL(); LEAVE_GL();
TRACE(" created a delayed OpenGL context (%p) for Wine context %p sharing lists with OpenGL ctx %p\n", dest->ctx, dest, org->ctx); TRACE(" created a delayed OpenGL context (%p) for Wine context %p sharing lists with OpenGL ctx %p\n", dest->ctx, dest, org->ctx);
}
return TRUE; return TRUE;
}
}
return FALSE;
} }
/*********************************************************************** /***********************************************************************
......
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