diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c index b2510b530..83f7dfbae 100644 --- a/src/x11/meta-x11-display.c +++ b/src/x11/meta-x11-display.c @@ -1483,7 +1483,9 @@ meta_x11_display_reload_cursor (MetaX11Display *x11_display) XDefineCursor (x11_display->xdisplay, x11_display->xroot, xcursor); XFlush (x11_display->xdisplay); - XFreeCursor (x11_display->xdisplay, xcursor); + + if (xcursor) + XFreeCursor (x11_display->xdisplay, xcursor); } static void