[libpeas] Fix reloading of python plugins.



commit c317c0aff5d6c8e6b69900646303ea822c28817f
Author: Steve Frécinaux <code istique net>
Date:   Thu Jul 22 13:54:04 2010 +0200

    Fix reloading of python plugins.
    
    libpeas used to crash when a plugin was reloaded because it was
    dereferencing a NULL pointer... We fix it by removing the entry from
    the hash table instead of nullifying it.

 loaders/python/peas-plugin-loader-python.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 405562e..716f9c6 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -329,7 +329,7 @@ peas_plugin_loader_python_unload (PeasPluginLoader *loader,
   Py_XDECREF (pyinfo->module);
   pyg_gil_state_release (state);
 
-  pyinfo->module = NULL;
+  g_hash_table_remove (pyloader->priv->loaded_plugins, info);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]