pdf-mime-data: Fix error checking

I am not quite sure, but an if for "ignore this error if something
failed" seems wrong. Either this should have compared against status2 or
checked for success. This commit fixes the code for the latter.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2021-03-08 17:26:50 +01:00
parent 7788000be0
commit 0c64c216aa

View file

@ -134,7 +134,7 @@ preamble (cairo_test_context_t *ctx)
cairo_destroy (cr);
cairo_surface_finish (surface);
status2 = cairo_surface_status (surface);
if (status != CAIRO_STATUS_SUCCESS)
if (status == CAIRO_STATUS_SUCCESS)
status = status2;
cairo_surface_destroy (surface);
cairo_surface_destroy (image);