summaryrefslogtreecommitdiff
path: root/src/plugins/dt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dt.c')
-rw-r--r--src/plugins/dt.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/plugins/dt.c b/src/plugins/dt.c
index 28b70bb..2899845 100644
--- a/src/plugins/dt.c
+++ b/src/plugins/dt.c
@@ -215,7 +215,24 @@ static void g_dynamic_types_dispose(GDynamicTypes *types)
if (info->type != G_TYPE_INVALID)
{
g_class = g_type_class_peek(info->type);
- g_type_class_unref(g_class);
+
+ /**
+ * Constat est fait qu'un type implémenté en Python mais dont les
+ * instanciations conduisent toutes à des exceptions n'est pas
+ * associé à une classe à ce moment d'exécution.
+ *
+ * Cf. fonction testKnownFormatConstructor() de la suite de tests
+ *
+ * Cf. documentation de g_type_class_unref() également :
+ *
+ * """
+ * Once the last reference count of a class has been released,
+ * classes may be finalized by the type system
+ * """
+ */
+
+ if (g_class != NULL)
+ g_type_class_unref(g_class);
info->type = G_TYPE_INVALID;