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 

What about this instead :

void fgExitCleanup() {
    if ( globals ) {
        delete globals;
        globals = 0;

It will allow to call the function twice safely. Can you test that.


Flightgear-devel mailing list

Reply via email to