summary refs log tree commit diff stats
path: root/compiler/semdata.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semdata.nim')
-rwxr-xr-xcompiler/semdata.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/semdata.nim b/compiler/semdata.nim
index 26552c294..ebae06ea1 100755
--- a/compiler/semdata.nim
+++ b/compiler/semdata.nim
@@ -146,14 +146,16 @@ proc PushOwner(owner: PSym) =
 
 proc PopOwner() = 
   var length = len(gOwners)
-  if (length <= 0): InternalError("popOwner")
-  setlen(gOwners, length - 1)
+  if length > 0: setlen(gOwners, length - 1)
+  else: InternalError("popOwner")
 
 proc lastOptionEntry(c: PContext): POptionEntry = 
   result = POptionEntry(c.optionStack.tail)
 
 proc pushProcCon*(c: PContext, owner: PSym) {.inline.} = 
-  if owner == nil: InternalError("owner is nil")
+  if owner == nil: 
+    InternalError("owner is nil")
+    return
   var x: PProcCon
   new(x)
   x.owner = owner