Author: fejj
Date: 2007-06-20 15:42:53 -0400 (Wed, 20 Jun 2007)
New Revision: 80353

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/runtime.cpp
Log:

2007-06-20  Jeffrey Stedfast  <[EMAIL PROTECTED]>

        * runtime.cpp (collection_iterator_move_next): If we can't iterate
        to the next item, don't set current = NULL.


Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-06-20 19:17:01 UTC (rev 80352)
+++ trunk/moon/src/ChangeLog    2007-06-20 19:42:53 UTC (rev 80353)
@@ -1,3 +1,8 @@
+2007-06-20  Jeffrey Stedfast  <[EMAIL PROTECTED]>
+
+       * runtime.cpp (collection_iterator_move_next): If we can't iterate
+       to the next item, don't set current = NULL.
+
 2007-06-20  Larry Ewing  <[EMAIL PROTECTED]>
 
        * runtime.cpp: use gdk_cairo helper functions and clip to the

Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp  2007-06-20 19:17:01 UTC (rev 80352)
+++ trunk/moon/src/runtime.cpp  2007-06-20 19:42:53 UTC (rev 80353)
@@ -208,12 +208,17 @@
 bool
 collection_iterator_move_next (CollectionIterator *iterator)
 {
+       List::Node *next;
+       
        if (!iterator->current)
                return false;
        
-       iterator->current = iterator->current->Next ();
+       if (!(next = iterator->current->Next ()))
+               return false;
        
-       return iterator->current != NULL;
+       iterator->current = next;
+       
+       return true;
 }
 
 void 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to