this makes debugging a bit easier.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
qom/object.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/qom/object.c b/qom/object.c
index c58c52d..a1e5f99 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -499,6 +499,10 @@ Object *object_new(const char *typename)
{
TypeImpl *ti = type_get_by_name(typename);
+ if (!ti) {
+ g_error("Object type not found: %s\n", typename);
+ }
+
return object_new_with_type(ti);
}
--
MST