remove the last critical error

This commit is contained in:
Eric House 2019-01-27 09:23:56 -08:00
parent a2aafc8b93
commit 36b21aa7ed

View file

@ -906,7 +906,9 @@ cleanup( GtkGameGlobals* globals )
{
CommonGlobals* cGlobals = &globals->cGlobals;
saveGame( cGlobals );
if ( 0 < globals->idleID ) {
g_source_remove( globals->idleID );
}
#ifdef XWFEATURE_BLUETOOTH
linux_bt_close( cGlobals );
@ -2199,6 +2201,7 @@ idle_func( gpointer data )
calls gtk_main, then this idle proc will also apply to that event loop
and bad things can happen. So kill the idle proc asap. */
g_source_remove( globals->idleID );
globals->idleID = 0; /* 0 is illegal event source ID */
ServerCtxt* server = globals->cGlobals.game.server;
if ( !!server && server_do( server ) ) {