mirror of https://github.com/i3/i3lock.git
Use cairo_status_to_string for descriptive errors.
parent
a72e0de842
commit
3e136769be
4
i3lock.c
4
i3lock.c
|
@ -657,8 +657,8 @@ int main(int argc, char *argv[]) {
|
||||||
img = cairo_image_surface_create_from_png(image_path);
|
img = cairo_image_surface_create_from_png(image_path);
|
||||||
/* In case loading failed, we just pretend no -i was specified. */
|
/* In case loading failed, we just pretend no -i was specified. */
|
||||||
if (cairo_surface_status(img) != CAIRO_STATUS_SUCCESS) {
|
if (cairo_surface_status(img) != CAIRO_STATUS_SUCCESS) {
|
||||||
fprintf(stderr, "Could not load image \"%s\": cairo surface status %d\n",
|
fprintf(stderr, "Could not load image \"%s\": %s\n",
|
||||||
image_path, cairo_surface_status(img));
|
image_path, cairo_status_to_string(cairo_surface_status(img)));
|
||||||
img = NULL;
|
img = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue