summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibCpp/Preprocessor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCpp/Preprocessor.cpp b/Userland/Libraries/LibCpp/Preprocessor.cpp
index 99bef96ea3..e276017455 100644
--- a/Userland/Libraries/LibCpp/Preprocessor.cpp
+++ b/Userland/Libraries/LibCpp/Preprocessor.cpp
@@ -67,6 +67,8 @@ void Preprocessor::handle_preprocessor_line(const StringView& line)
lexer.consume_specific('#');
consume_whitespace();
auto keyword = lexer.consume_until(' ');
+ if (keyword.is_empty() || keyword.is_null() || keyword.is_whitespace())
+ return;
if (keyword == "include") {
consume_whitespace();