aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-12-13 02:02:29 +0100
committerUlrich Sibiller <uli42@gmx.de>2017-03-10 19:44:21 +0100
commit35e41467a2ef4c2ddd4b545c2d68abf47278aa1e (patch)
tree357808d87405553dce0057f11144a0d533d980ac
parent4a1095fffb03396fc7eec5a11bc9139ebc831cb6 (diff)
downloadnx-libs-35e41467a2ef4c2ddd4b545c2d68abf47278aa1e.tar.gz
nx-libs-35e41467a2ef4c2ddd4b545c2d68abf47278aa1e.tar.bz2
nx-libs-35e41467a2ef4c2ddd4b545c2d68abf47278aa1e.zip
Window.c: Fix reference before check for null pointer
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 982c88314..23e1d5452 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -3122,10 +3122,14 @@ static void nxagentReconfigureWindowCursor(void * param0, XID param1, void * dat
WindowPtr pWin = (WindowPtr)param0;
Bool *pBool = (Bool*)data_buffer;
CursorPtr pCursor;
- ScreenPtr pScreen = pWin -> drawable.pScreen;
+ ScreenPtr pScreen;
- if (!pWin || !*pBool || !(pCursor = wCursor(pWin)) ||
- !(nxagentCursorPriv(pCursor, pScreen)))
+ if (!pWin || !*pBool || !(pCursor = wCursor(pWin)))
+ return;
+
+ pScreen = pWin -> drawable.pScreen;
+
+ if (!(nxagentCursorPriv(pCursor, pScreen)))
{
return;
}