[Opensrf-commits] r1531 - trunk/src/libopensrf

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


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

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

Modified: trunk/src/libopensrf/osrf_message.c
===================================================================
--- trunk/src/libopensrf/osrf_message.c	2008-12-18 03:15:14 UTC (rev 1530)
+++ trunk/src/libopensrf/osrf_message.c	2008-12-18 03:21:02 UTC (rev 1531)
@@ -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