Merge branch 'matthiasc/for-main' into 'main'

wayland: Add debug spew

See merge request GNOME/gtk!7412
This commit is contained in:
Matthias Clasen 2024-07-04 02:19:54 +00:00
commit 53ac80d6c8

View File

@ -349,8 +349,10 @@ wl_cursor_theme_create(const char *path, int size, struct wl_shm *shm)
struct wl_cursor_theme *theme; struct wl_cursor_theme *theme;
theme = malloc(sizeof *theme); theme = malloc(sizeof *theme);
if (!theme) if (!theme) {
g_warning ("malloc() failed");
return NULL; return NULL;
}
theme->path = strdup (path); theme->path = strdup (path);
theme->size = size; theme->size = size;
@ -359,6 +361,7 @@ wl_cursor_theme_create(const char *path, int size, struct wl_shm *shm)
theme->pool = shm_pool_create(shm, size * size * 4); theme->pool = shm_pool_create(shm, size * size * 4);
if (!theme->pool) { if (!theme->pool) {
g_warning ("shm_pool_create() failed");
free (theme->path); free (theme->path);
free (theme); free (theme);
return NULL; return NULL;