From 2b35c5e1633c76219ee5a8295e22947ce2399ef9 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Tue, 25 Mar 2014 04:53:19 +0000 Subject: [PATCH] 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. --- libchimara/chimara-glk.c | 1 + 1 file changed, 1 insertion(+) 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; } /** -- 2.30.2