cursor-renderer/native: Fix Xcursor image loading error handling

Check the return value whether there was an error, and change to
g_warning to warn while at it.

https://gitlab.gnome.org/GNOME/mutter/issues/77
This commit is contained in:
Jonas Ådahl 2018-05-02 16:56:14 +02:00
parent b596cf97ee
commit 6c7c566c6c

View File

@ -149,10 +149,9 @@ load_from_current_xcursor_image (MetaCursorSpriteXcursor *sprite_xcursor)
rowstride,
(uint8_t *) xc_image->pixels,
&error);
if (error)
if (!texture)
{
meta_warning ("Failed to allocate cursor texture: %s\n", error->message);
g_warning ("Failed to allocate cursor texture: %s\n", error->message);
cogl_error_free (error);
}