diff --git a/src/keyboard.c b/src/keyboard.c index 8f4b9b4425f..aa8a5e05467 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -521,6 +521,9 @@ echo_dash () { if (!immediate_echo && echoptr == echobuf) return; + /* Do nothing if not echoing at all. */ + if (echoptr == 0) + return; /* Put a dash at the end of the buffer temporarily, but make it go away when the next character is added. */