From 91aa5847ba00e27c3f7b94068960daff0c930110 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 13 Jun 2002 18:18:33 +0000 Subject: Bug fixes from Sebastien. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2309 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/pixmap_browser.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/pixmap_browser.cxx b/test/pixmap_browser.cxx index e5bdfc4b8..8bb023fbd 100644 --- a/test/pixmap_browser.cxx +++ b/test/pixmap_browser.cxx @@ -1,5 +1,5 @@ // -// "$Id: pixmap_browser.cxx,v 1.5.2.4.2.5 2002/01/06 17:51:12 easysw Exp $" +// "$Id: pixmap_browser.cxx,v 1.5.2.4.2.6 2002/06/13 18:18:33 easysw Exp $" // // A shared image test program for the Fast Light Tool Kit (FLTK). // @@ -44,6 +44,10 @@ void load_file(const char *n) { if (img) img->release(); img = Fl_Shared_Image::get(n); + if (!img) { + fl_alert("Image file format not recognized!"); + return; + } if (img->w() > b->w() || img->h() > b->h()) { Fl_Image *temp; if (img->w() > img->h()) temp = img->copy(b->w(), b->h() * img->h() / img->w()); @@ -94,5 +98,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: pixmap_browser.cxx,v 1.5.2.4.2.5 2002/01/06 17:51:12 easysw Exp $". +// End of "$Id: pixmap_browser.cxx,v 1.5.2.4.2.6 2002/06/13 18:18:33 easysw Exp $". // -- cgit v1.2.3