Fix crash if the cursor surface is null

This commit is contained in:
Ignacio Casal Quinteiro 2015-12-20 19:36:24 +01:00
parent bd32f7cbea
commit b801f79ee0

View file

@ -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: