diff --git a/python/RO/Wdg/LogWdg.py b/python/RO/Wdg/LogWdg.py index 4c5241a..88f20a1 100755 --- a/python/RO/Wdg/LogWdg.py +++ b/python/RO/Wdg/LogWdg.py @@ -306,8 +306,11 @@ def isScrolledToEnd(self): # test two cases: # scrollPos[1] = 1.0: scrolled to end # scrollPos[1] = scrollPos[0]: window has not yet been painted - scrollPos = self.yscroll.get() - return scrollPos[1] == 1.0 or scrollPos[0] == scrollPos[1] + try: + scrollPos = self.yscroll.get() + return scrollPos[1] == 1.0 or scrollPos[0] == scrollPos[1] + except Tkinter.TclError: + return True def search(self, searchStr, backwards=False, doWrap=False, elide=True, noCase=False, regExp=False): """Find and select the next instance of a specified string. diff --git a/python/RO/Wdg/StripChartWdg.py b/python/RO/Wdg/StripChartWdg.py index e0116c6..9f4c429 100755 --- a/python/RO/Wdg/StripChartWdg.py +++ b/python/RO/Wdg/StripChartWdg.py @@ -410,7 +410,11 @@ def _redraw(self): """Redraw the graph """ self.line2d.set_data(self._tList, self._yList) - if not self._wdg.winfo_ismapped(): + try: + if not self._wdg.winfo_ismapped(): + return + except Tkinter.TclError as e: + # This means the window was probably closed return if len(self._yList) > 0: # see if limits need updating to include last point