Jonathan Polley wrote:
> Fred,
>
> It turns out that the problem should exist on every FlightGear
> system, not just the Mac. On exit(), fgExitCleanup() is called which
> deletes the globals class and then calls fgOSExit(). The only thing
> that fgOSExit() does is turn around and call exit(), which repeats the
> process. I changed fgExitCleanup() in main.cxx to be as follows:
>
> void fgExitCleanup() {
> delete globals;
> //fgOSExit(0);
> }
>
> This prevented the recursive call to exit(), but will not work if
> someone is using the fg_os_sld.cxx module, but it works for me.
I was suspecting that but was not able to reproduce this behavior on
windows.
What about this instead :
void fgExitCleanup() {
if ( globals ) {
delete globals;
globals = 0;
fgOSExit(0);
}
}
It will allow to call the function twice safely. Can you test that.
-Fred
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel