summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2006-03-03 09:43:42 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2006-03-03 09:43:42 +0000
commit06f01623fde61f1a11c2c1ecfae6a4c346473b05 (patch)
tree0651ccf42dbe7688fa48e9e9c5d6fa8aefd33200
parent054c291b274b238893e408e070aef13a7933400b (diff)
https://bugs.freedesktop.org/show_bug.cgi?id=5138 Check for NULL pointer
-rw-r--r--hw/xwin/ChangeLog7
-rwxr-xr-xhw/xwin/winmultiwindowicons.c7
-rwxr-xr-xhw/xwin/winwin32rootlesswindow.c2
3 files changed, 12 insertions, 4 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index 93da0323a..bdf8417dd 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -1,3 +1,10 @@
+2006-03-03 Alan Hourihane <alanh@fairlite.demon.co.uk>
+
+ * winmultiwindowicons.c: (winXIconToHICON), (winUpdateIcon):
+ * winwin32rootlesswindow.c: (winMWExtWMUpdateIcon):
+ https://bugs.freedesktop.org/show_bug.cgi?id=5138
+ Check for NULL pointer
+
2005-07-05 Alexander Gottwald <ago at freedesktop dot org>
* winmultiwindowwm.c:
diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c
index 2121e998f..5692b29c7 100755
--- a/hw/xwin/winmultiwindowicons.c
+++ b/hw/xwin/winmultiwindowicons.c
@@ -282,7 +282,7 @@ winXIconToHICON (WindowPtr pWin, int iconSize)
winMultiWindowGetWMHints (pWin, &hints);
if (!hints.icon_pixmap) return NULL;
- iconPtr = LookupIDByType (hints.icon_pixmap, RT_PIXMAP);
+ iconPtr = (PixmapPtr) LookupIDByType (hints.icon_pixmap, RT_PIXMAP);
if (!iconPtr) return NULL;
@@ -311,7 +311,7 @@ winXIconToHICON (WindowPtr pWin, int iconSize)
memset (mask, 0, maskStride * iconSize);
winScaleXBitmapToWindows (iconSize, effBPP, iconPtr, image);
- maskPtr = LookupIDByType (hints.icon_mask, RT_PIXMAP);
+ maskPtr = (PixmapPtr) LookupIDByType (hints.icon_mask, RT_PIXMAP);
if (maskPtr)
{
@@ -369,7 +369,8 @@ winUpdateIcon (Window id)
WindowPtr pWin;
HICON hIcon, hiconOld;
- pWin = LookupIDByType (id, RT_WINDOW);
+ pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
+ if (!pWin) return;
hIcon = (HICON)winOverrideIcon ((unsigned long)pWin);
if (!hIcon)
diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
index 693d5cd09..dedcd7a76 100755
--- a/hw/xwin/winwin32rootlesswindow.c
+++ b/hw/xwin/winwin32rootlesswindow.c
@@ -164,7 +164,7 @@ winMWExtWMUpdateIcon (Window id)
WindowPtr pWin;
HICON hIcon, hiconOld;
- pWin = LookupIDByType (id, RT_WINDOW);
+ pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
hIcon = (HICON)winOverrideIcon ((unsigned long)pWin);
if (!hIcon)