mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 23:33:57 +01:00
Check errors of cairo_image_surface_create properly
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
f240bdb93c
commit
6f6e8ea94e
@ -130,6 +130,11 @@ cb_print_draw_page(GtkPrintOperation* print_operation, GtkPrintContext*
|
||||
gtk_print_operation_cancel(print_operation);
|
||||
return;
|
||||
}
|
||||
if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {
|
||||
gtk_print_operation_cancel(print_operation);
|
||||
cairo_surface_destroy(surface);
|
||||
return;
|
||||
}
|
||||
|
||||
cairo_t* temp_cairo = cairo_create(surface);
|
||||
if (cairo == NULL) {
|
||||
|
@ -746,6 +746,10 @@ render(render_job_t* job, ZathuraRenderRequest* request, ZathuraRenderer* render
|
||||
if (surface == NULL) {
|
||||
return false;
|
||||
}
|
||||
if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) {
|
||||
cairo_surface_destroy(surface);
|
||||
return false;
|
||||
}
|
||||
|
||||
cairo_t* cairo = cairo_create(surface);
|
||||
if (cairo == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user