Alexandre Julliard : winex11: Silence a harmless error.

Alexandre Julliard julliard at winehq.org
Mon May 12 13:41:10 CDT 2008


Module: wine
Branch: master
Commit: 4d926e3ebc480a2edb7313af56e8395fe7f802a6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4d926e3ebc480a2edb7313af56e8395fe7f802a6

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon May 12 19:58:35 2008 +0200

winex11: Silence a harmless error.

---

 dlls/winex11.drv/opengl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index f92f943..04c2f2a 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1425,10 +1425,11 @@ int X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) {
   int tmp;
   TRACE("(%p)\n", physDev);
 
+  if (!physDev->current_pf) return 0;  /* not set yet */
+
   fmt = ConvertPixelFormatWGLtoGLX(gdi_display, physDev->current_pf, TRUE, &tmp);
   if(!fmt)
   {
-    /* This happens on HDCs on which SetPixelFormat wasn't called yet */
     ERR("Unable to find a WineGLPixelFormat for iPixelFormat=%d\n", physDev->current_pf);
     return 0;
   }




More information about the wine-cvs mailing list