Allow users to close the code window and not crash
This commit is contained in:
parent
43dd282702
commit
193196cc03
2 changed files with 33 additions and 16 deletions
|
|
@ -518,6 +518,10 @@ class DebugSession( object ):
|
|||
self.SetCurrentFrame( None )
|
||||
|
||||
def SetCurrentFrame( self, frame ):
|
||||
if not frame:
|
||||
self._stackTraceView.Clear()
|
||||
self._variablesView.Clear()
|
||||
|
||||
if not self._codeView.SetCurrentFrame( frame ):
|
||||
return False
|
||||
|
||||
|
|
@ -526,9 +530,6 @@ class DebugSession( object ):
|
|||
self._stackTraceView.SetSyntax( self._codeView.current_syntax )
|
||||
self._variablesView.LoadScopes( frame )
|
||||
self._variablesView.EvaluateWatches()
|
||||
else:
|
||||
self._stackTraceView.Clear()
|
||||
self._variablesView.Clear()
|
||||
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue