mirror of
https://github.com/brl/mutter.git
synced 2024-12-01 12:20:47 -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
(cherry picked from commit 1bfa20929b
)
This commit is contained in:
parent
4525a74e59
commit
bcba6571f0
@ -1397,6 +1397,8 @@ meta_screen_update_cursor (MetaScreen *screen)
|
|||||||
|
|
||||||
XDefineCursor (display->xdisplay, screen->xroot, xcursor);
|
XDefineCursor (display->xdisplay, screen->xroot, xcursor);
|
||||||
XFlush (display->xdisplay);
|
XFlush (display->xdisplay);
|
||||||
|
|
||||||
|
if (xcursor)
|
||||||
XFreeCursor (display->xdisplay, xcursor);
|
XFreeCursor (display->xdisplay, xcursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user