From caef04e0579f261964b475d6574537d2281bd23d Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 31 Jan 2011 17:46:55 +0000 Subject: Fixed WIN32 crash when the file dialog window is cancelled. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8344 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/pixmap_browser.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/pixmap_browser.cxx b/test/pixmap_browser.cxx index 112fdcd40..af82c2efa 100644 --- a/test/pixmap_browser.cxx +++ b/test/pixmap_browser.cxx @@ -88,7 +88,8 @@ void file_cb(const char *n) { 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); } -- cgit v1.2.3