[Opensrf-commits] r1046 - branches/new-json2/src/libopensrf

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jul 18 15:23:46 EDT 2007


Author: erickson
Date: 2007-07-18 15:23:45 -0400 (Wed, 18 Jul 2007)
New Revision: 1046

Modified:
   branches/new-json2/src/libopensrf/string_array.c
Log:
added NULL check to new osrfStringArrayGetString function

Modified: branches/new-json2/src/libopensrf/string_array.c
===================================================================
--- branches/new-json2/src/libopensrf/string_array.c	2007-07-18 05:21:54 UTC (rev 1045)
+++ branches/new-json2/src/libopensrf/string_array.c	2007-07-18 19:23:45 UTC (rev 1046)
@@ -30,10 +30,12 @@
 }
 
 char* osrfStringArrayGetString(osrfStringArray* arr, int index) {
+    if(!arr) return NULL;
     return OSRF_LIST_GET_INDEX(arr->list, index);
 }
 
 char* string_array_get_string(string_array* arr, int index) {
+    if(!arr) return NULL;
     return OSRF_LIST_GET_INDEX(arr->list, index);
 }
 



More information about the opensrf-commits mailing list