mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-14 11:52:29 +00:00
Fix crash if the cursor surface is null
This commit is contained in:
parent
bd32f7cbea
commit
b801f79ee0
|
@ -56,6 +56,11 @@ gitg_platform_support_create_cursor_surface (GdkDisplay *display,
|
|||
cursor = gdk_cursor_new_for_display (display, cursor_type);
|
||||
surface = gdk_cursor_get_surface (cursor, hot_x, hot_y);
|
||||
|
||||
if (surface == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (cairo_surface_get_type (surface))
|
||||
{
|
||||
case CAIRO_SURFACE_TYPE_XLIB:
|
||||
|
|
Loading…
Reference in a new issue