Issue #22614: Don't try to update deleted text.  Patch by Serhiy Storchaka.
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 91e0e82..427d3ce 100755
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -156,6 +156,9 @@
 
     def color_breakpoint_text(self, color=True):
         "Turn colorizing of breakpoint text on or off"
+        if self.io is None:
+            # possible due to update in restore_file_breaks
+            return
         if color:
             theme = idleConf.GetOption('main','Theme','name')
             cfg = idleConf.GetHighlight(theme, "break")