diff options
| author | Manolo Gouy <Manolo> | 2017-10-04 21:34:03 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-10-04 21:34:03 +0000 |
| commit | 0cec3f7e9d7fe5a3838bc6985f49ad855ef5426d (patch) | |
| tree | 876949c47e81d4f2e8d6b3b8487a64a0e565a10a /src/Fl_SVG_Image.cxx | |
| parent | 0b797d704c718aba64720734377f7b23aa0098f5 (diff) | |
Fl_SVG_Image constructor: handle case where file cannot be opened.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12478 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_SVG_Image.cxx')
| -rw-r--r-- | src/Fl_SVG_Image.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx index c5ad1e69f..c1548ec16 100644 --- a/src/Fl_SVG_Image.cxx +++ b/src/Fl_SVG_Image.cxx @@ -103,6 +103,7 @@ static char *svg_inflate(const char *fname) { fl_stat(fname, &b); long size = b.st_size; gzFile gzf = (gzFile)Fl_SVG_Image::gzopen(fname); + if (!gzf) return NULL; int l; bool direct = gzdirect(gzf); long out_size = direct ? size + 1 : 3*size + 1; @@ -288,7 +289,6 @@ int Fl_SVG_Image::draw_scaled(int X, int Y, int W, int H) { #endif // FLTK_USE_NANOSVG - // // End of "$Id$". // |
