summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drmMode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index 86572872..681ad417 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -329,7 +329,10 @@ int drmModeSetCursor(int fd, uint32_t crtcId, drmBO *bo, uint32_t width, uint32_
arg.crtc = crtcId;
arg.width = width;
arg.height = height;
- arg.handle = bo->handle;
+ if (bo)
+ arg.handle = bo->handle;
+ else
+ arg.handle = 0;
return ioctl(fd, DRM_IOCTL_MODE_CURSOR, &arg);
}