From 69e6c9b597f5749efba3cf99a43587eeadd5e019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Voves?= Date: Sun, 23 Nov 2025 17:11:51 +0100 Subject: [PATCH] Fix DbgHelpSymbolResolve segfault in destructor if m_symInitialize failed in constructor. (#352) --- src/debug.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/debug.cpp b/src/debug.cpp index b557ffd..5f92672 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -812,7 +812,10 @@ namespace bx void cleanup() { - m_symCleanup(kCurrentProcess); + if(NULL != m_symCleanup) + { + m_symCleanup(kCurrentProcess); + } m_symInitialize = NULL; m_symCleanup = NULL;