summaryrefslogtreecommitdiff
path: root/hw/xwin/winprefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwin/winprefs.c')
-rw-r--r--hw/xwin/winprefs.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c
index 015ca96a1..0209d51f5 100644
--- a/hw/xwin/winprefs.c
+++ b/hw/xwin/winprefs.c
@@ -196,16 +196,18 @@ ReloadEnumWindowsProc (HWND hwnd, LPARAM lParam)
winWMMessageRec wmMsg;
WindowPtr pWin = GetProp(hwnd, WIN_WINDOW_PROP);
- winPrivWinPtr pWinPriv = winGetWindowPriv(pWin);
- winPrivScreenPtr s_pScreenPriv = pWinPriv->pScreenPriv;
+ if (pWin)
+ {
+ winPrivWinPtr pWinPriv = winGetWindowPriv(pWin);
+ winPrivScreenPtr s_pScreenPriv = pWinPriv->pScreenPriv;
- wmMsg.msg = WM_WM_ICON_EVENT;
- wmMsg.hwndWindow = hwnd;
- wmMsg.iWindow = (Window)GetProp(hwnd, WIN_WID_PROP);
+ wmMsg.msg = WM_WM_ICON_EVENT;
+ wmMsg.hwndWindow = hwnd;
+ wmMsg.iWindow = (Window)GetProp(hwnd, WIN_WID_PROP);
- winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
+ winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
+ }
}
-
/* Update the system menu for this window */
SetupSysMenu ((unsigned long)hwnd);