Debugger/DebugViewer.py

changeset 2766
c413e9eeaf95
parent 2723
f6ad272bf486
child 2791
a9577f248f04
child 2824
858412c29c34
--- a/Debugger/DebugViewer.py	Sun Jun 30 20:04:49 2013 +0200
+++ b/Debugger/DebugViewer.py	Wed Jul 03 19:23:52 2013 +0200
@@ -276,9 +276,9 @@
         """
         self.globalsViewer.handleResetUI()
         self.localsViewer.handleResetUI()
-        self.stackComboBox.clear()
         self.sourceButton.setEnabled(False)
         self.currentStack = None
+        self.stackComboBox.clear()
         self.__threadList.clear()
         if self.embeddedShell:
             self.__tabWidget.setCurrentWidget(self.shellAssembly)
@@ -411,8 +411,10 @@
         """
         Private slot to handle the source button press to show the selected file.
         """
-        s = self.currentStack[self.stackComboBox.currentIndex()]
-        self.sourceFile.emit(s[0], int(s[1]))
+        index = self.stackComboBox.currentIndex()
+        if index > -1 and self.currentStack:
+            s = self.currentStack[index]
+            self.sourceFile.emit(s[0], int(s[1]))
         
     def __frameSelected(self, frmnr):
         """

eric ide

mercurial