aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/debugger.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 1de322ae93..b18e50b824 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -276,6 +276,8 @@ void Debugger::enter() {
}
bool Debugger::handleCommand(int argc, const char **argv, bool &result) {
+ assert(argc > 0);
+
if (_cmds.contains(argv[0])) {
assert(_cmds[argv[0]]);
result = (*_cmds[argv[0]])(argc, argv);
@@ -295,6 +297,9 @@ bool Debugger::parseCommand(const char *inputOrig) {
char *input = strdup(inputOrig);
splitCommand(input, num_params, &param[0]);
+ if (num_params == 0)
+ return true;
+
// Handle commands first
bool result;
if (handleCommand(num_params, param, result)) {