[gom] gom: Add guards in class metadata setters
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gom] gom: Add guards in class metadata setters
- Date: Thu, 17 Apr 2014 20:45:33 +0000 (UTC)
commit 1161965e67bf98f52f949227ae455082b00a0b3d
Author: Bastien Nocera <hadess hadess net>
Date: Thu Apr 17 22:42:40 2014 +0200
gom: Add guards in class metadata setters
gom/gom-resource.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gom/gom-resource.c b/gom/gom-resource.c
index b032a05..618c4b5 100644
--- a/gom/gom-resource.c
+++ b/gom/gom-resource.c
@@ -62,6 +62,7 @@ gom_resource_class_set_property_new_in_version (GomResourceClass *resource_class
GParamSpec *pspec;
g_return_if_fail(GOM_IS_RESOURCE_CLASS(resource_class));
+ g_return_if_fail(property_name != NULL);
g_return_if_fail(version >= 1);
pspec = g_object_class_find_property(G_OBJECT_CLASS(resource_class), property_name);
@@ -78,6 +79,7 @@ gom_resource_class_set_property_set_mapped (GomResourceClass *resource_class,
GParamSpec *pspec;
g_return_if_fail(GOM_IS_RESOURCE_CLASS(resource_class));
+ g_return_if_fail(property_name != NULL);
pspec = g_object_class_find_property(G_OBJECT_CLASS(resource_class), property_name);
g_assert(pspec);
@@ -94,6 +96,7 @@ gom_resource_class_set_property_transform (GomResourceClass *resource_cl
GParamSpec *pspec;
g_return_if_fail(GOM_IS_RESOURCE_CLASS(resource_class));
+ g_return_if_fail(property_name != NULL);
g_return_if_fail(to_bytes_func != NULL);
g_return_if_fail(from_bytes_func != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]