Browse Source

Fixes argc == 0 segfault.


			
			
				branch-1.0
			
			
		
Carl E. Thompson 26 years ago
parent
commit
6b60719c6d
  1. 5
      src/Fl_arg.cxx

5
src/Fl_arg.cxx

@ -1,5 +1,5 @@
// //
// "$Id: Fl_arg.cxx,v 1.5 1999/01/07 19:17:31 mike Exp $" // "$Id: Fl_arg.cxx,v 1.5.2.1 1999/12/01 15:49:28 carl Exp $"
// //
// Optional argument initialization code for the Fast Light Tool Kit (FLTK). // Optional argument initialization code for the Fast Light Tool Kit (FLTK).
// //
@ -141,6 +141,7 @@ int Fl::args(int argc, char** argv, int& i, int (*cb)(int,char**,int&)) {
// show a main window, use any parsed arguments // show a main window, use any parsed arguments
void Fl_Window::show(int argc, char **argv) { void Fl_Window::show(int argc, char **argv) {
if (!argc) return show();
if (!arg_called) Fl::args(argc,argv); if (!arg_called) Fl::args(argc,argv);
// set colors first, so background_pixel is correct: // set colors first, so background_pixel is correct:
@ -351,5 +352,5 @@ int XParseGeometry(const char* string, int* x, int* y,
#endif // ifdef WIN32 #endif // ifdef WIN32
// //
// End of "$Id: Fl_arg.cxx,v 1.5 1999/01/07 19:17:31 mike Exp $". // End of "$Id: Fl_arg.cxx,v 1.5.2.1 1999/12/01 15:49:28 carl Exp $".
// //

Loading…
Cancel
Save