- set debug messages after a TRACE_ON test

- prevent crash when making the NULL context current
This commit is contained in:
Lionel Ulmer 2000-05-14 22:53:17 +00:00 committed by Alexandre Julliard
parent c6369b0bd7
commit 61e4283585
2 changed files with 6 additions and 2 deletions

View File

@ -199,7 +199,9 @@ BOOL WINAPI wglMakeCurrent(HDC hdc,
physDev =(X11DRV_PDEVICE *)dc->physDev; physDev =(X11DRV_PDEVICE *)dc->physDev;
ENTER_GL(); ENTER_GL();
ret = glXMakeCurrent(display, physDev->drawable, (GLXContext) hglrc); ret = glXMakeCurrent(display,
(hglrc == NULL ? None : physDev->drawable),
(GLXContext) hglrc);
LEAVE_GL(); LEAVE_GL();
return ret; return ret;

View File

@ -253,7 +253,9 @@ int X11DRV_DescribePixelFormat(DC *dc,
ppfd->iLayerType = PFD_MAIN_PLANE; ppfd->iLayerType = PFD_MAIN_PLANE;
dump_PIXELFORMATDESCRIPTOR(ppfd); if (TRACE_ON(opengl)) {
dump_PIXELFORMATDESCRIPTOR(ppfd);
}
return MAX_PIXELFORMATS; return MAX_PIXELFORMATS;
} }