From 3e5d1e857f4bf0e28d550c4ccf3aaa1617331a8f Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Sun, 5 Aug 2012 04:28:57 +0000 Subject: [PATCH] calling glutExit in the erro callback is a really bad example... git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1381 7f0cb862-5218-0410-a997-914c9d46530a --- progs/demos/CallbackMaker/CallbackMaker.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/progs/demos/CallbackMaker/CallbackMaker.c b/progs/demos/CallbackMaker/CallbackMaker.c index 6c8730d..2d31062 100644 --- a/progs/demos/CallbackMaker/CallbackMaker.c +++ b/progs/demos/CallbackMaker/CallbackMaker.c @@ -151,18 +151,13 @@ Error(const char *fmt, va_list ap) /* print warning message */ vprintf(fmt, ap); - /* deInitialize the freeglut state */ - /* This all goes haywire of course when the error occurs during deinitialize, - * one might want to call exit directly as its possible freeglut is messed - * up internally when error is called. - */ - printf("Error callback: calling glutExit() to prepare for clean exit\n"); - glutExit(); - - /* terminate program */ + /* terminate program, after pause for input so user can see */ printf ( "Please enter something to exit: " ); fgets ( dummy_string, STRING_LENGTH, stdin ); + /* Call exit directly as freeglut is messed + * up internally when an error is called. + */ exit(1); } -- 1.7.10.4