From 0c64c216aaf44d476637879d998fef96f0164762 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 8 Mar 2021 17:26:50 +0100 Subject: [PATCH] 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 --- test/pdf-mime-data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pdf-mime-data.c b/test/pdf-mime-data.c index 69fafa145..7033f6051 100644 --- a/test/pdf-mime-data.c +++ b/test/pdf-mime-data.c @@ -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);