From 8c56fa2f436d35aaf3f0a9888a47bd231eccc540 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Tue, 27 May 2025 19:00:37 +0300 Subject: [PATCH] Fix configuration list view root tree node doubleclick crash --- od-win32/win32gui.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 5ea14ddb..d905c00f 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -6587,10 +6587,12 @@ static INT_PTR CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA { LPNMTREEVIEW tv = (LPNMTREEVIEW)lParam; struct ConfigStruct *c = (struct ConfigStruct*)tv->itemNew.lParam; - if (tv->action == TVE_EXPAND) { - c->expanded = true; - } else if (tv->action == TVE_COLLAPSE) { - c->expanded = false; + if (c) { + if (tv->action == TVE_EXPAND) { + c->expanded = true; + } else if (tv->action == TVE_COLLAPSE) { + c->expanded = false; + } } break; } -- 2.47.3