diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 97b2066..c4511fd 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -482,6 +482,10 @@ panel_add_launcher(struct panel *panel, const char *icon, const char *path) launcher = malloc(sizeof *launcher); memset(launcher, 0, sizeof *launcher); launcher->icon = cairo_image_surface_create_from_png(icon); + if (cairo_surface_status(launcher->icon) != CAIRO_STATUS_SUCCESS) { + fprintf(stderr, "Error creating surface for icon: %s\n", icon); + exit(1); + } launcher->path = strdup(path); wl_array_init(&launcher->envp);