summaryrefslogtreecommitdiff
path: root/src/Fl_PNG_Image.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_PNG_Image.cxx')
-rw-r--r--src/Fl_PNG_Image.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Fl_PNG_Image.cxx b/src/Fl_PNG_Image.cxx
index b5de742a5..d88a5402a 100644
--- a/src/Fl_PNG_Image.cxx
+++ b/src/Fl_PNG_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_PNG_Image.cxx,v 1.1.2.9 2003/01/30 21:42:23 easysw Exp $"
+// "$Id: Fl_PNG_Image.cxx,v 1.1.2.10 2003/09/15 23:52:38 easysw Exp $"
//
// Fl_PNG_Image routines.
//
@@ -32,6 +32,7 @@
// Include necessary header files...
//
+#include <FL/Fl.H>
#include <FL/Fl_PNG_Image.H>
#include <config.h>
#include <stdio.h>
@@ -72,6 +73,12 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
info = png_create_info_struct(pp);
+ if (setjmp(pp->jmpbuf))
+ {
+ Fl::warning("PNG file \"%s\" contains errors!\n", png);
+ return;
+ }
+
// Initialize the PNG read "engine"...
png_init_io(pp, fp);
@@ -132,5 +139,5 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
//
-// End of "$Id: Fl_PNG_Image.cxx,v 1.1.2.9 2003/01/30 21:42:23 easysw Exp $".
+// End of "$Id: Fl_PNG_Image.cxx,v 1.1.2.10 2003/09/15 23:52:38 easysw Exp $".
//