- Fixed exception when enumerated list is preceeded by a bullet list


git-svn-id: https://svn.apache.org/repos/asf/incubator/zetacomponents/trunk@978725 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/Document/src/document/rst/visitor.php b/Document/src/document/rst/visitor.php
index 1be988e..e7bd816 100644
--- a/Document/src/document/rst/visitor.php
+++ b/Document/src/document/rst/visitor.php
@@ -315,7 +315,8 @@
         // valid successor of the prior value.
         if ( $item instanceof ezcDocumentRstEnumeratedListNode )
         {
-            return ( $item->listType === $lastItem->listType );
+            return ( $lastItem instanceof ezcDocumentRstEnumeratedListNode ) &&
+                ( $item->listType === $lastItem->listType );
         }
 
         return true;