Applying diff from superceding patch provided by Scott McKellar
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 11 Apr 2008 14:58:49 +0000 (14:58 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 11 Apr 2008 14:58:49 +0000 (14:58 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1306 9efc2488-bf62-4759-914b-345cdb29e865

src/libopensrf/osrf_hash.c

index 091089d..972ccfb 100644 (file)
@@ -265,7 +265,7 @@ void osrfHashIteratorFree( osrfHashIterator* itr ) {
 
 void osrfHashIteratorReset( osrfHashIterator* itr ) {
        if(!itr) return;
-       itr->current[0] = '\0';
+    if(itr->current) itr->current[0] = '\0';
        itr->keys = osrfHashKeysInc(itr->hash);
        itr->currentIdx = 0;
 }