summaryrefslogtreecommitdiff
path: root/hw/xwin
diff options
context:
space:
mode:
authorRyan Pavlik <rpavlik@iastate.edu>2011-10-28 09:56:19 -0500
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-01-07 22:50:13 +0000
commit3d80f202b06227f7fc03b674f5fbf809c2d1efb2 (patch)
treeb91b56c559acdb94c68782066f135b1a0141a5a7 /hw/xwin
parentc824004b4592b3d86b3514be7cab37b36642b13a (diff)
hw/xwin: Fix possible null ptr deref in winMWExtWMDecorateWindow()
Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'hw/xwin')
-rw-r--r--hw/xwin/winwin32rootlesswindow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c
index 214e8954b..fbff83888 100644
--- a/hw/xwin/winwin32rootlesswindow.c
+++ b/hw/xwin/winwin32rootlesswindow.c
@@ -202,7 +202,8 @@ winMWExtWMDecorateWindow (HWND hwnd, LPARAM lParam)
/* Check if the Windows window property for our X window pointer is valid */
if ((pRLWinPriv = (win32RootlessWindowPtr)GetProp (hwnd, WIN_WINDOW_PROP)) != NULL)
{
- pScreen = pRLWinPriv->pFrame->win->drawable.pScreen;
+ if (pRLWinPriv != NULL && pRLWinPriv->pFrame != NULL && pRLWinPriv->pFrame->win != NULL)
+ pScreen = pRLWinPriv->pFrame->win->drawable.pScreen;
if (pScreen) pScreenPriv = winGetScreenPriv(pScreen);
if (pScreenPriv) pScreenInfo = pScreenPriv->pScreenInfo;
if (pRLWinPriv && pScreenInfo) winMWExtWMUpdateWindowDecoration (pRLWinPriv, pScreenInfo);