diff --git a/lib/TerminalCharacterDecoder.cpp b/lib/TerminalCharacterDecoder.cpp index b42010bd..5cdd65ab 100644 --- a/lib/TerminalCharacterDecoder.cpp +++ b/lib/TerminalCharacterDecoder.cpp @@ -79,14 +79,11 @@ void PlainTextDecoder::decodeLine(const Character* const characters, int count, _linePositions << pos; } - // check the real length - for (int i = 0 ; i < count ; i++) + if (characters == nullptr) { - if (characters + i == nullptr) - { - count = i; - break; - } + // TODO: So far, this has happened only under kwin_wayland, when the current function + // is called by TerminalDisplay::inputMethodQuery(). The actual issue should be found. + return; } //TODO should we ignore or respect the LINE_WRAPPED line property?