summaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
Diffstat (limited to 'qom')
-rw-r--r--qom/object.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/qom/object.c b/qom/object.c
index ef37e080d..a12895fc9 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -87,6 +87,11 @@ TypeImpl *type_register(const TypeInfo *info)
g_assert(info->name != NULL);
+ if (type_table_lookup(info->name) != NULL) {
+ fprintf(stderr, "Registering `%s' which already exists\n", info->name);
+ abort();
+ }
+
ti->name = g_strdup(info->name);
ti->parent = g_strdup(info->parent);