Commit 8572ecfd authored by Dan Williams's avatar Dan Williams
Browse files

libnm-glib: don't crash on unknown object types

Like when an old libnm-glib is being run against a newer NM when
a new device type has been added.
parent 836f7d17
......@@ -445,6 +445,11 @@ _nm_object_create (GType type, DBusGConnection *connection, const char *path)
if (type_func)
type = type_func (connection, path);
if (type == G_TYPE_INVALID) {
g_warning ("Could not create object for %s: unknown object type", path);
return NULL;
object = g_object_new (type,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment