From: miker Date: Sat, 17 Jan 2009 16:37:13 +0000 (+0000) Subject: more explicit "is it NULL" test X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=26482d57a5ebed4dbc5321b2262590998c5979e5;p=OpenSRF.git more explicit "is it NULL" test git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_1_0@1628 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/libopensrf/osrf_message.c b/src/libopensrf/osrf_message.c index c9e85c4..ee6604e 100644 --- a/src/libopensrf/osrf_message.c +++ b/src/libopensrf/osrf_message.c @@ -311,7 +311,8 @@ int osrf_message_deserialize(const char* string, osrfMessage* msgs[], int count) tmp = jsonObjectGetKeyConst(message, "locale"); - if(tmp && (new_msg->sender_locale = jsonObjectToSimpleString(tmp))) { + if(tmp && tmp->type != JSON_NULL) { + new_msg->sender_locale = jsonObjectToSimpleString(tmp); current_locale = strdup( new_msg->sender_locale ); } else { current_locale = NULL;