[virt-tools-list] [libosinfo v2 05/11] Add a NULL check
Zeeshan Ali (Khattak)
zeeshanak at gnome.org
Tue Nov 13 15:13:44 UTC 2012
From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
---
osinfo/osinfo_entity.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/osinfo/osinfo_entity.c b/osinfo/osinfo_entity.c
index 9fabc46..348981e 100644
--- a/osinfo/osinfo_entity.c
+++ b/osinfo/osinfo_entity.c
@@ -221,6 +221,7 @@ void osinfo_entity_set_param_enum(OsinfoEntity *entity, const gchar *key, gint v
enum_class = g_type_class_ref(enum_type);
enum_value = g_enum_get_value(enum_class, value);
g_type_class_unref(enum_class);
+ g_return_if_fail(enum_value != NULL);
osinfo_entity_set_param(entity, key, enum_value->value_nick);
}
--
1.8.0
More information about the virt-tools-list
mailing list