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:06:40 +0000 (05:06 +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 448ceb138fdd301b8c1ab632b6ab39fca219068c..265b007110de1c6b4404059798148e7b078d3c8d 100644 (file)
@@ -1378,6 +1378,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;
 }
 
 /**