summary refs log tree commit diff stats
path: root/lib/system/excpt.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/excpt.nim')
-rw-r--r--lib/system/excpt.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index 4074002fe..2595a045b 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -531,12 +531,12 @@ when not defined(noSignalHandler) and not defined(useNimRtl):
     when defined(memtracker):
       logPendingOps()
     when hasSomeStackTrace:
-      GC_disable()
+      when not defined(gcDestructors): GC_disable()
       var buf = newStringOfCap(2000)
       rawWriteStackTrace(buf)
       processSignal(sign, buf.add) # nice hu? currying a la Nim :-)
       showErrorMessage(buf)
-      GC_enable()
+      when not defined(gcDestructors): GC_enable()
     else:
       var msg: cstring
       template asgn(y) =