Clear GModule pointer to prevent accidental re-use
authorPhilip Chimento <philip.chimento@gmail.com>
Tue, 25 Mar 2014 04:53:19 +0000 (04:53 +0000)
committerPhilip Chimento <philip.chimento@gmail.com>
Tue, 25 Mar 2014 05:07:28 +0000 (05:07 +0000)
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

index 9d9b4696e6f8dd58a7a3ba46aa9413ba4ee18b86..29a7dce9cbd5356ad5200b41410600c6b9118d51 100644 (file)
@@ -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;
 }
 
 /**