Skip to content

Commit 3099762

Browse files
committed
Add heapfrom input validity check
1 parent a99f663 commit 3099762

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

commands/FBDebugCommands.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ def description(self):
391391
def run(self, arguments, options):
392392
# This command is like `expression --synthetic-type false`, except only showing nested heap references.
393393
var = self.context.frame.var(arguments[0])
394+
if not var or not var.IsValid():
395+
self.result.SetError('No variable named "{}"'.format(arguments[0]))
396+
return
397+
394398
# Use the actual underlying structure of the variable, not the human friendly (synthetic) one.
395399
root = var.GetNonSyntheticValue()
396400

0 commit comments

Comments
 (0)