Blame SOURCES/0001-backends-x11-Only-free-cursor-if-it-was-created-succ.patch

776610
From f76cacd15430bcc22d9f66e0b500e3ec8a242c23 Mon Sep 17 00:00:00 2001
776610
From: Sebastian Keller <sebastian-keller@gmx.de>
776610
Date: Thu, 2 Aug 2018 00:58:56 +0200
776610
Subject: [PATCH] backends/x11: Only free cursor if it was created successfully
776610
776610
XcursorLibraryLoadCursor can return 'None' if the current cursor theme
776610
is missing the requested icon. If XFreeCursor is then called on this
776610
cursor, it generates a BadCursor error causing gnome-shell to crash.
776610
776610
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/254
776610
776610
(cherry picked from commit 1bfa20929b36d06cc23667d1122175149615b56d)
776610
---
776610
 src/core/screen.c | 4 +++-
776610
 1 file changed, 3 insertions(+), 1 deletion(-)
776610
776610
diff --git a/src/core/screen.c b/src/core/screen.c
776610
index c14bba0cf..d7623f3fb 100644
776610
--- a/src/core/screen.c
776610
+++ b/src/core/screen.c
776610
@@ -1394,7 +1394,9 @@ meta_screen_update_cursor (MetaScreen *screen)
776610
 
776610
   XDefineCursor (display->xdisplay, screen->xroot, xcursor);
776610
   XFlush (display->xdisplay);
776610
-  XFreeCursor (display->xdisplay, xcursor);
776610
+
776610
+  if (xcursor)
776610
+    XFreeCursor (display->xdisplay, xcursor);
776610
 }
776610
 
776610
 void
776610
-- 
776610
2.19.0
776610