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:
parent
b596cf97ee
commit
6c7c566c6c
@ -149,10 +149,9 @@ load_from_current_xcursor_image (MetaCursorSpriteXcursor *sprite_xcursor)
|
|||||||
rowstride,
|
rowstride,
|
||||||
(uint8_t *) xc_image->pixels,
|
(uint8_t *) xc_image->pixels,
|
||||||
&error);
|
&error);
|
||||||
|
if (!texture)
|
||||||
if (error)
|
|
||||||
{
|
{
|
||||||
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);
|
cogl_error_free (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user