Debugger/DebugViewer.py

branch
5_3_x
changeset 2767
4e1314bbe21f
parent 2724
68d67e0f9773
child 2825
323d417d256b
--- a/Debugger/DebugViewer.py	Sun Jun 30 20:03:24 2013 +0200
+++ b/Debugger/DebugViewer.py	Wed Jul 03 19:23:52 2013 +0200
@@ -267,9 +267,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)
@@ -390,8 +390,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