X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aca310e5cc45db153540efe2df577d8f985ccfc1..68fc5c8025e38b9d827383fbfe7ce509ae331c1f:/wxPython/wx/lib/docview.py diff --git a/wxPython/wx/lib/docview.py b/wxPython/wx/lib/docview.py index 3d24b224d3..83423dbf1b 100644 --- a/wxPython/wx/lib/docview.py +++ b/wxPython/wx/lib/docview.py @@ -1039,7 +1039,7 @@ class DocTemplate(wx.Object): string will be displayed in the file filter list of Windows file selectors. - filter is an appropriate file filter such as *.txt. + filter is an appropriate file filter such as \*.txt. dir is the default directory to use for file selectors. @@ -1387,7 +1387,8 @@ class DocManager(wx.EvtHandler): for document in self._docs[::-1]: # Close in lifo (reverse) order. We clone the list to make sure we go through all docs even as they are deleted if not self.CloseDocument(document, force): return False - document.DeleteAllViews() # Implicitly delete the document when the last view is removed + if document: + document.DeleteAllViews() # Implicitly delete the document when the last view is removed return True