From 81fe702b774cdb80c6a89434f2fe0e17111cec7c Mon Sep 17 00:00:00 2001 From: Ekopalypse <47723516+Ekopalypse@users.noreply.github.com> Date: Mon, 21 Jun 2021 07:01:18 +0200 Subject: [PATCH] builtin: disable the unhandled exception handler, when `-d no_backtrace` is used (#10530) --- vlib/builtin/builtin_windows.c.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/builtin/builtin_windows.c.v b/vlib/builtin/builtin_windows.c.v index 333282c105..9e2ffa744f 100644 --- a/vlib/builtin/builtin_windows.c.v +++ b/vlib/builtin/builtin_windows.c.v @@ -98,7 +98,9 @@ fn builtin_init() { C.setbuf(C.stderr, 0) } } - add_unhandled_exception_handler() + $if !no_backtrace ? { + add_unhandled_exception_handler() + } } fn print_backtrace_skipping_top_frames(skipframes int) bool {