[Opensrf-commits] r1532 - branches/rel_1_0/src/libopensrf

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Dec 17 22:21:28 EST 2008


Author: erickson
Date: 2008-12-17 22:21:26 -0500 (Wed, 17 Dec 2008)
New Revision: 1532

Modified:
   branches/rel_1_0/src/libopensrf/osrf_message.c
Log:
protect against "null" locale

Modified: branches/rel_1_0/src/libopensrf/osrf_message.c
===================================================================
--- branches/rel_1_0/src/libopensrf/osrf_message.c	2008-12-18 03:21:02 UTC (rev 1531)
+++ branches/rel_1_0/src/libopensrf/osrf_message.c	2008-12-18 03:21:26 UTC (rev 1532)
@@ -310,8 +310,8 @@
 				free( current_locale );
 
 			tmp = jsonObjectGetKeyConst(message, "locale");
-			if(tmp) {
-				new_msg->sender_locale = jsonObjectToSimpleString(tmp);
+
+			if(tmp && (new_msg->sender_locale = jsonObjectToSimpleString(tmp))) {
 				current_locale = strdup( new_msg->sender_locale );
 			} else {
 				current_locale = NULL;



More information about the opensrf-commits mailing list