From 46cb6c29550c7a890f05449e2ebd2dbe6853cedb Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 28 Feb 2009 16:31:03 +0000 Subject: [PATCH] fix assertion on exit: nuke mempool after everything it contains; call gtk_main_quit rather than gtk_exit() so can exit from main() --- xwords4/linux/gtkmain.c | 4 +--- xwords4/linux/linuxmain.c | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xwords4/linux/gtkmain.c b/xwords4/linux/gtkmain.c index 7d59b0423..9ef3550b9 100644 --- a/xwords4/linux/gtkmain.c +++ b/xwords4/linux/gtkmain.c @@ -565,9 +565,7 @@ quit( void* XP_UNUSED(dunno), GtkAppGlobals* globals ) vtmgr_destroy( MEMPOOL globals->cGlobals.params->vtMgr ); - mpool_destroy( globals->cGlobals.params->util->mpool ); - - gtk_exit( 0 ); + gtk_main_quit(); } /* quit */ GtkWidget* diff --git a/xwords4/linux/linuxmain.c b/xwords4/linux/linuxmain.c index 3edb71180..183050ea2 100644 --- a/xwords4/linux/linuxmain.c +++ b/xwords4/linux/linuxmain.c @@ -1051,8 +1051,10 @@ main( int argc, char** argv ) /* run server as faceless process? */ } - dict_destroy( mainParams.dict ); linux_util_vt_destroy( mainParams.util ); + + mpool_destroy( mainParams.util->mpool ); + XP_LOGF( "exiting main" ); return 0; } /* main */