diff --git a/Userland/Libraries/LibMarkdown/Text.cpp b/Userland/Libraries/LibMarkdown/Text.cpp index 6a0d0464103..02b0e97e586 100644 --- a/Userland/Libraries/LibMarkdown/Text.cpp +++ b/Userland/Libraries/LibMarkdown/Text.cpp @@ -668,7 +668,8 @@ NonnullOwnPtr Text::parse_link(Vector::ConstIterator& tokens) StringBuilder address; - bool is_escaped = *(tokens + 1) == "<"sv; + auto next = tokens + 1; + bool is_escaped = !next.is_end() && *next == "<"sv; // Don't add the angle bracket to the address. if (is_escaped) tokens++;