Fix crash with malformed with statements

This commit is contained in:
Hackerpilot 2015-01-29 23:14:38 -08:00
parent cd71108de1
commit 2129f0625b
1 changed files with 2 additions and 2 deletions

View File

@ -256,8 +256,8 @@ struct Scope
{ {
foreach (item; sc.symbols[]) foreach (item; sc.symbols[])
{ {
if (item.kind == CompletionKind.importSymbol if (item.type !is null && (item.kind == CompletionKind.importSymbol
|| item.kind == CompletionKind.withSymbol) || item.kind == CompletionKind.withSymbol))
{ {
foreach (i; item.type.parts[]) foreach (i; item.type.parts[])
symbols.insert(i); symbols.insert(i);