Skip to content

Commit

Permalink
src: don't crash with no arguments to print
Browse files Browse the repository at this point in the history
This commit prevents a segfault on `v8 print`.
  • Loading branch information
cjihrig committed Jun 23, 2017
1 parent 0905ce8 commit 9e5d9dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/llnode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ bool BacktraceCmd::DoExecute(SBDebugger d, char** cmd,

bool PrintCmd::DoExecute(SBDebugger d, char** cmd,
SBCommandReturnObject& result) {
if (*cmd == NULL) {
if (cmd == NULL || *cmd == NULL) {
if (detailed_) {
result.SetError("USAGE: v8 inspect [flags] expr\n");
} else {
Expand Down

0 comments on commit 9e5d9dc

Please sign in to comment.