From 5246133a607561abe8096c471de02bddeb6be67c Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 9 Nov 2012 00:23:44 +0000 Subject: Updated error response parsing. Also, use this for 401 responses so for example the auth errors caused by NTP desync are clearer: twitter - Login error: Authentication failure (401 Unauthorized (Timestamp out of bounds)) --- lib/json_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/json_util.c') diff --git a/lib/json_util.c b/lib/json_util.c index 43e687e3..470a6b02 100644 --- a/lib/json_util.c +++ b/lib/json_util.c @@ -30,7 +30,7 @@ json_value *json_o_get( const json_value *obj, const json_char *name ) { int i; - if( obj->type != json_object ) + if( !obj || obj->type != json_object ) return NULL; for( i = 0; i < obj->u.object.length; ++ i) -- cgit v1.2.3