[json-glib] path: Check if JSONPath expression is NULL
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] path: Check if JSONPath expression is NULL
- Date: Thu, 19 Sep 2013 08:26:55 +0000 (UTC)
commit ce46c06d9c088501c8cbab2dba51856be1a05592
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Sep 18 17:52:17 2013 +0000
path: Check if JSONPath expression is NULL
https://bugzilla.gnome.org/show_bug.cgi?id=708318
json-glib/json-path.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/json-glib/json-path.c b/json-glib/json-path.c
index ed36ac1..014abeb 100644
--- a/json-glib/json-path.c
+++ b/json-glib/json-path.c
@@ -419,6 +419,8 @@ json_path_compile (JsonPath *path,
PathNode *root = NULL;
GList *nodes;
+ g_return_val_if_fail (expression != NULL, FALSE);
+
p = expression;
while (*p != '\0')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]