From: Philip Chimento Date: Tue, 25 Mar 2014 04:53:19 +0000 (+0000) Subject: Clear GModule pointer to prevent accidental re-use X-Git-Url: https://git.stderr.nl/gitweb?p=projects%2Fchimara%2Fchimara.git;a=commitdiff_plain;h=2b35c5e1633c76219ee5a8295e22947ce2399ef9 Clear GModule pointer to prevent accidental re-use This makes it harmless (as it should be) to call chimara_glk_unload_plugin() more than once. Since it is called in any case when running a new game, client code calling it externally would occasionally result in problems. --- diff --git a/libchimara/chimara-glk.c b/libchimara/chimara-glk.c index 9d9b469..29a7dce 100644 --- a/libchimara/chimara-glk.c +++ b/libchimara/chimara-glk.c @@ -1316,6 +1316,7 @@ chimara_glk_unload_plugin(ChimaraGlk *glk) CHIMARA_GLK_USE_PRIVATE(glk, priv); if( priv->program && !g_module_close(priv->program) ) g_warning( "Error closing module :%s", g_module_error() ); + priv->program = NULL; } /**