summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/nimconf.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim
index 0818ddd0d..93cc21573 100644
--- a/compiler/nimconf.nim
+++ b/compiler/nimconf.nim
@@ -160,8 +160,9 @@ proc checkSymbol(L: TLexer, tok: TToken) =
 
 proc parseAssignment(L: var TLexer, tok: var TToken;
                      config: ConfigRef; condStack: var seq[bool]) =
-  if tok.ident.s == "-" or tok.ident.s == "--":
-    confTok(L, tok, config, condStack)           # skip unnecessary prefix
+  if tok.ident != nil:
+    if tok.ident.s == "-" or tok.ident.s == "--":
+      confTok(L, tok, config, condStack)           # skip unnecessary prefix
   var info = getLineInfo(L, tok) # save for later in case of an error
   checkSymbol(L, tok)
   var s = $tok