diff options
author | Adam Jackson <ajax@redhat.com> | 2018-04-23 15:21:14 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-04-24 14:28:27 -0400 |
commit | 9d5af632fde0373babfa32e66a59cfbf26ed7e5d (patch) | |
tree | 3615a8e0d933fa689152eabe7891c2ad4b1a4810 | |
parent | 8275903956d7876519fa55fb805669dc301bf243 (diff) |
animcur: Fix crash when removing a master device
Reproducer:
$ Xvfb -ac -noreset :1 &
$ DISPLAY=:1 xinput create-master touch1
$ DISPLAY=:1 xinput remove-master "touch1 pointer"
Bugzilla: https://bugs.freedesktop.org/105761
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | render/animcur.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/render/animcur.c b/render/animcur.c index 65327df65..ef27bda27 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -155,7 +155,8 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg) static void AnimCurCancelTimer(DeviceIntPtr pDev) { - CursorPtr cur = pDev->spriteInfo->sprite->current; + CursorPtr cur = pDev->spriteInfo->sprite ? + pDev->spriteInfo->sprite->current : NULL; if (IsAnimCur(cur)) TimerCancel(GetAnimCur(cur)->timer); |