Skip to content

backends/x11: Only free cursor if it was created successfully

Sebastian Keller requested to merge skeller/mutter:missing-cursor-crash into master

XcursorLibraryLoadCursor can return NULL if the current cursor theme is missing the requested icon. If XFreeCursor is then called on such a NULL cursor, it generates a BadCursor error causing gnome-shell to crash.

Now if we can't load a cursor, just use the 'None' cursor instead to indicate a missing cursor and don't try to free it.

Fixes #254 (closed)

Merge request reports