TextViewer.py
changeset 687 629680fb0582
parent 684 f10449b18dbe
child 696 8865c406f616
--- a/TextViewer.py	Sat May 19 12:40:53 2012 +0200
+++ b/TextViewer.py	Mon May 21 09:59:44 2012 +0200
@@ -247,7 +247,8 @@
         return {"cursor_pos": self.Editor.GetCurrentPos()}
     
     def SetState(self, state):
-        self.Editor.GotoPos(state.get("cursor_pos", 0))
+        if self:
+            self.Editor.GotoPos(state.get("cursor_pos", 0))
         
     def OnModification(self, event):
         if not self.DisableEvents: