diff -r 3216bf5f711d -r 629680fb0582 TextViewer.py --- 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: