Commit 1b7e6018 authored by Philip Withnall's avatar Philip Withnall

libcheese: Fix critical on failing to load cropping cursor

Loading a cursor can fail (`gdk_cursor_new_for_display()` can return
`NULL`); avoid a critical warning in that case.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <pwithnall@endlessos.org>
parent 9f0825c3
Pipeline #217261 passed with stage
in 5 minutes and 35 seconds
......@@ -474,7 +474,7 @@ update_cursor (UmCropArea *area,
GdkCursor *cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET (area)),
cursor_type);
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (area)), cursor);
g_object_unref (cursor);
g_clear_object (&cursor);
priv->current_cursor = cursor_type;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment