diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index d3c4de0f4a..8c8a12a327 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -920,7 +920,7 @@ proc genDeref(p: BProc, e: PNode, d: var TLoc) = else: a = initLocExprSingleUse(p, e[0]) - if e.typ.kind == tyObject: + if e.typ != nil and e.typ.kind == tyObject: # bug #23453 #25265 discard getTypeDesc(p.module, e.typ) if d.k == locNone: