Make terminating on signal via NSApp conditional on NSApp actually existing. This allows you to kill applications with ^C if they are using AppKit but not NSApplication.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29016 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2009-11-15 13:57:34 +00:00
parent 43eaa1d512
commit ed0e764447

View file

@ -45,9 +45,16 @@
/* Terminate cleanly if we get a signal to do so */ /* Terminate cleanly if we get a signal to do so */
static void static void
terminate(int sig) terminate(int sig)
{
if (nil != NSApp)
{ {
[NSApp terminate: NSApp]; [NSApp terminate: NSApp];
} }
else
{
exit(1);
}
}
#ifdef HAVE_WRASTER_H #ifdef HAVE_WRASTER_H
#include "wraster.h" #include "wraster.h"