From 15c0bb1bd06b5ab101dc4e87eda2dbc85651a9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 13 Dec 2023 22:00:55 +0100 Subject: [PATCH] Fix crash in debugger after unloading the game. --- Windows/Debugger/Debugger_Lists.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Windows/Debugger/Debugger_Lists.cpp b/Windows/Debugger/Debugger_Lists.cpp index 8e65ea2770..c5f2a67b51 100644 --- a/Windows/Debugger/Debugger_Lists.cpp +++ b/Windows/Debugger/Debugger_Lists.cpp @@ -672,7 +672,9 @@ bool CtrlStackTraceView::WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, L void CtrlStackTraceView::GetColumnText(wchar_t* dest, int row, int col) { - if (row < 0 || row >= (int)frames.size()) { + // We should have emptied the list if g_symbolMap is nullptr, but apparently we don't, + // so let's have a sanity check here. + if (row < 0 || row >= (int)frames.size() || !g_symbolMap) { return; }