projects
/
xboard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
598822d
)
Fix bug #45775 (Infinite loop on nonexistent texture file)
author
H.G.Muller
<hgm@hgm-xboard.(none)>
Sat, 27 Feb 2016 19:45:01 +0000 (20:45 +0100)
committer
H.G.Muller
<hgm@hgm-xboard.(none)>
Sat, 27 Feb 2016 19:45:01 +0000 (20:45 +0100)
draw.c
patch
|
blob
|
history
diff --git
a/draw.c
b/draw.c
index
afb6393
..
01add14
100644
(file)
--- 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]);