[Python-checkins] r65474 - sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py

guilherme.polo python-checkins at python.org
Mon Aug 4 03:54:17 CEST 2008


Author: guilherme.polo
Date: Mon Aug  4 03:54:17 2008
New Revision: 65474

Log:
Check if current_page is still valid before using it. One situation it may be invalid is when requesting to close IDLE while Debugger window is open.

Modified:
   sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py

Modified: sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py	(original)
+++ sandbox/trunk/ttk-gsoc/src/idlelib/PyShell.py	Mon Aug  4 03:54:17 2008
@@ -1214,6 +1214,9 @@
         self.console.write(s)
 
         curr_page = self.current_page
+        if not curr_page:
+            return
+
         curr_page.text.mark_set("insert", "end-1c")
         self.set_line_and_column()
         curr_page.io.reset_undo()


More information about the Python-checkins mailing list