[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [libosinfo v2 05/11] Add a NULL check



From: "Zeeshan Ali (Khattak)" <zeeshanak 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]