diff --git a/nw/core/document.py b/nw/core/document.py index b9d3de83..835ecdba 100644 --- a/nw/core/document.py +++ b/nw/core/document.py @@ -206,7 +206,7 @@ class NWDoc(): """ if len(self.docMeta) < 14: # Not enough information - return "", [] + return "", [], None, None theMeta = self.docMeta diff --git a/nw/core/project.py b/nw/core/project.py index 53286656..3db93bf2 100644 --- a/nw/core/project.py +++ b/nw/core/project.py @@ -1081,6 +1081,11 @@ class NWProject(): nOrph += 1 oName = "Orphaned File %d" % nOrph + if oClass is None: + oClass = nwItemClass.NO_CLASS + if oLayout is None: + oLayout = nwItemLayout.NO_LAYOUT + orphItem = NWItem(self) orphItem.setName(oName) orphItem.setType(nwItemType.FILE)