Ensure the window is still valid before adjusting the scrollbars

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-01-29 02:36:29 +00:00
parent 59c24dcbf6
commit bf56f4ece0

View File

@@ -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