[PATCH] winex11.drv: check physDev for NULL (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat Oct 17 05:52:25 CDT 2009


Hi,

the rest of the code also checks physDev for NULL,
and falling back to the default shifts seems to be
intended.

Ciao, Marcus
---
 dlls/winex11.drv/palette.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/winex11.drv/palette.c b/dlls/winex11.drv/palette.c
index 55896a1..483f24e 100644
--- a/dlls/winex11.drv/palette.c
+++ b/dlls/winex11.drv/palette.c
@@ -887,7 +887,7 @@ int X11DRV_PALETTE_ToPhysical( X11DRV_PDEVICE *physDev, COLORREF color )
     PALETTEENTRY entry;
     ColorShifts *shifts = &X11DRV_PALETTE_default_shifts;
 
-    if(physDev->color_shifts)
+    if(physDev && physDev->color_shifts)
         shifts = physDev->color_shifts;
 
     if ( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_FIXED )
-- 
1.5.6



More information about the wine-patches mailing list