diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c index 31114f3749e..e216af615a9 100644 --- a/intern/guardedalloc/intern/mallocn_guarded_impl.c +++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c @@ -47,7 +47,9 @@ * twice, once here, and once by LSAN. */ #if defined(_MSC_VER) -# define DEBUG_BACKTRACE +# ifdef WITH_ASAN +# define DEBUG_BACKTRACE +# endif #else /* Un-comment to report back-traces with leaks, uses ASAN when enabled. * NOTE: The default linking options cause the stack traces only to include addresses.