diff --git a/src/ddmd/lexer.d b/src/ddmd/lexer.d index 1b85b9b4f010..57dd69070fbc 100644 --- a/src/ddmd/lexer.d +++ b/src/ddmd/lexer.d @@ -186,7 +186,7 @@ class Lexer //initKeywords(); /* If first line starts with '#!', ignore the line */ - if (p[0] == '#' && p[1] == '!') + if (p && p[0] == '#' && p[1] == '!') { p += 2; while (1)