diff --git a/src/calibre/ebooks/lrf/objects.py b/src/calibre/ebooks/lrf/objects.py index 31130c77f8..ae9736a2f8 100644 --- a/src/calibre/ebooks/lrf/objects.py +++ b/src/calibre/ebooks/lrf/objects.py @@ -188,7 +188,7 @@ class PageTree(LRFObject): tag_map.update(LRFObject.tag_map) def __iter__(self): - for id in self._contents: + for id in getattr(self, '_contents', []): yield self._document.objects[id] class StyleObject(object):