Skip to content

Commit

Permalink
Ensure we have a valid holder before returning JSON data.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Sep 26, 2016
1 parent c74af42 commit fb36a22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/json.c
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,9 @@ get_json (GLog * glog, GHolder * holder, int escape_html)
GJSON *json = NULL;
char *buf = NULL;

if (holder == NULL)
return NULL;

escape_html_output = escape_html;
if ((json = init_json_output (glog, holder)) && json->size > 0) {
buf = xstrdup (json->buf);
Expand Down

0 comments on commit fb36a22

Please sign in to comment.