mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
backends/x11: Only free cursor if it was created successfully
XcursorLibraryLoadCursor can return 'None' if the current cursor theme is missing the requested icon. If XFreeCursor is then called on this cursor, it generates a BadCursor error causing gnome-shell to crash. Fixes https://gitlab.gnome.org/GNOME/mutter/issues/254
This commit is contained in:
parent
deb541ef5a
commit
e741adb82e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user