From 3d4d97da355c0dd90b1e623f452da22894f8cd71 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Thu, 31 Jan 2019 21:48:50 +0100
Subject: Queried the parent type of copied dynamic instances.

---
 src/plugins/dt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/dt.c b/src/plugins/dt.c
index 14b03f0..fc398cd 100644
--- a/src/plugins/dt.c
+++ b/src/plugins/dt.c
@@ -504,6 +504,7 @@ void register_dynamic_type_pattern(GObject *instance)
 {
     GType type;                             /* Type d'instances concerné   */
     type_dyn_info_t *nfo;                   /* Source d'inspiration        */
+    GType parent;                           /* Type parent du type         */
     GTypeQuery query;                       /* Informations complémentaires*/
 
     type = G_TYPE_FROM_INSTANCE(instance);
@@ -511,7 +512,8 @@ void register_dynamic_type_pattern(GObject *instance)
     nfo = g_dynamic_types_find(_chrysalide_dtypes, type);
     assert(nfo != NULL);
 
-    g_type_query(type, &query);
+    parent = g_type_parent(type);
+    g_type_query(parent, &query);
 
     if (nfo->pattern == NULL)
         nfo->pattern = malloc(query.instance_size);
-- 
cgit v0.11.2-87-g4458