X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/095315e20d117d292ea01f8f964b19c032a0fd56..2f72b58ae6635bca17e8e19889a84e3b70c7f3a5:/wxPython/wx/lib/editor/editor.py?ds=sidebyside diff --git a/wxPython/wx/lib/editor/editor.py b/wxPython/wx/lib/editor/editor.py index 351e5f3d89..943e42dd27 100644 --- a/wxPython/wx/lib/editor/editor.py +++ b/wxPython/wx/lib/editor/editor.py @@ -552,12 +552,13 @@ class Editor(wx.ScrolledWindow): def AdjustScrollbars(self): - for i in range(2): - self.SetCharDimensions() - self.scroller.SetScrollbars( - self.fw, self.fh, - self.CalcMaxLineLen()+3, max(self.LinesInFile()+1, self.sh), - self.sx, self.sy) + if self: + for i in range(2): + self.SetCharDimensions() + self.scroller.SetScrollbars( + self.fw, self.fh, + self.CalcMaxLineLen()+3, max(self.LinesInFile()+1, self.sh), + self.sx, self.sy) #------------ backspace, delete, return