diff options
author | Ryan Pavlik <rpavlik@iastate.edu> | 2011-10-28 09:56:19 -0500 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-01-07 22:50:13 +0000 |
commit | 3d80f202b06227f7fc03b674f5fbf809c2d1efb2 (patch) | |
tree | b91b56c559acdb94c68782066f135b1a0141a5a7 /hw/xwin | |
parent | c824004b4592b3d86b3514be7cab37b36642b13a (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.c | 3 |
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); |