Author: manolo
Date: 2011-01-31 09:46:55 -0800 (Mon, 31 Jan 2011)
New Revision: 8344
Log:
Fixed WIN32 crash when the file dialog window is cancelled.

Modified:
   branches/branch-1.3/test/pixmap_browser.cxx

Modified: branches/branch-1.3/test/pixmap_browser.cxx
===================================================================
--- branches/branch-1.3/test/pixmap_browser.cxx 2011-01-31 17:17:54 UTC (rev 
8343)
+++ branches/branch-1.3/test/pixmap_browser.cxx 2011-01-31 17:46:55 UTC (rev 
8344)
@@ -88,7 +88,8 @@
 
 void button_cb(Fl_Widget *,void *) {
   fl_file_chooser_callback(file_cb);
-  puts(fl_file_chooser("Image 
file?","*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm}", name));
+  const char *fname = fl_file_chooser("Image 
file?","*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm}", name);
+  puts(fname ? fname : "(null)"); fflush(stdout);
   fl_file_chooser_callback(0);
 }
 

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to