Index: /trunk/psLib/src/collections/psList.c
===================================================================
--- /trunk/psLib/src/collections/psList.c	(revision 3084)
+++ /trunk/psLib/src/collections/psList.c	(revision 3085)
@@ -6,6 +6,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-25 00:12:12 $
+ *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-25 01:04:17 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -495,5 +495,13 @@
 psPtr psListGetNext(psListIterator* iterator)
 {
-    if (iterator == NULL || iterator->cursor == NULL) {
+    if (iterator == NULL ) {
+        return NULL;
+    }
+    if (( iterator->cursor == NULL) && (iterator->offEnd)) {
+        return NULL;
+    }
+    if ( (iterator->cursor == NULL) && (!iterator->offEnd)) {
+        iterator->cursor = iterator->list->head;
+        iterator->index = 0;
         return NULL;
     }
@@ -512,5 +520,9 @@
 psPtr psListGetPrevious(psListIterator* iterator)
 {
-    if ( (iterator == NULL ) || ((iterator->cursor == NULL) && (!iterator->offEnd)) ) {
+    if (iterator == NULL ) {
+        return NULL;
+    }
+    if ((iterator->cursor == NULL) && (!iterator->offEnd))  {
+        psLogMsg(__func__,PS_LOG_WARN,"Attempt to get previous with itertator cursor NULL and offEnd false");
         return NULL;
     }
Index: /trunk/psLib/src/types/psList.c
===================================================================
--- /trunk/psLib/src/types/psList.c	(revision 3084)
+++ /trunk/psLib/src/types/psList.c	(revision 3085)
@@ -6,6 +6,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-25 00:12:12 $
+ *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-25 01:04:17 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -495,5 +495,13 @@
 psPtr psListGetNext(psListIterator* iterator)
 {
-    if (iterator == NULL || iterator->cursor == NULL) {
+    if (iterator == NULL ) {
+        return NULL;
+    }
+    if (( iterator->cursor == NULL) && (iterator->offEnd)) {
+        return NULL;
+    }
+    if ( (iterator->cursor == NULL) && (!iterator->offEnd)) {
+        iterator->cursor = iterator->list->head;
+        iterator->index = 0;
         return NULL;
     }
@@ -512,5 +520,9 @@
 psPtr psListGetPrevious(psListIterator* iterator)
 {
-    if ( (iterator == NULL ) || ((iterator->cursor == NULL) && (!iterator->offEnd)) ) {
+    if (iterator == NULL ) {
+        return NULL;
+    }
+    if ((iterator->cursor == NULL) && (!iterator->offEnd))  {
+        psLogMsg(__func__,PS_LOG_WARN,"Attempt to get previous with itertator cursor NULL and offEnd false");
         return NULL;
     }
