Second time bugfix, please be carefully.
Use dialog functions in Fatal only if dialog_active, else use fprintf(stderr, because it may be called before dialog initialization
This commit is contained in:
parent
2a054bc060
commit
6373dcc600
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3749
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: utils.c,v 1.4 1994/10/20 19:30:56 ache Exp $
|
||||
* $Id: utils.c,v 1.5 1994/10/21 02:14:54 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -50,9 +50,12 @@ Fatal(char *fmt, ...)
|
||||
vsnprintf(p, 2048, fmt, ap);
|
||||
va_end(ap);
|
||||
sprintf(p+strlen(p),"\nErrno= %d, %s.",i,strerror(i));
|
||||
dialog_msgbox("Fatal", p, 12, 75, 1);
|
||||
if (dialog_active) {
|
||||
dialog_msgbox("Fatal", p, 12, 75, 1);
|
||||
end_dialog();
|
||||
} else
|
||||
fprintf(stderr, "Fatal -- %s", p);
|
||||
free(p);
|
||||
end_dialog();
|
||||
exit(7);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user