From 713f3a53e3efbd2e32d7111ad9fb63044904744b Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 27 Feb 2016 20:45:01 +0100 Subject: [PATCH] Fix bug #45775 (Infinite loop on nonexistent texture file) --- draw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/draw.c b/draw.c index afb6393..01add14 100644 --- a/draw.c +++ b/draw.c @@ -253,7 +253,7 @@ CreatePNGBoard (char *s, int kind) textureW[kind] = 0; // prevents bitmap from being used if not succesfully loaded if(strstr(s, ".png")) { cairo_surface_t *img = cairo_image_surface_create_from_png (s); - if(img) { + if(cairo_surface_status(img) == CAIRO_STATUS_SUCCESS) { char c, *p = s, *q; int r, f; if(pngOriginalBoardBitmap[kind]) cairo_surface_destroy(pngOriginalBoardBitmap[kind]); -- 1.7.0.4