From: Toni Wilen Date: Tue, 27 May 2025 16:00:37 +0000 (+0300) Subject: Fix configuration list view root tree node doubleclick crash X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=8c56fa2f436d35aaf3f0a9888a47bd231eccc540;p=francis%2Fwinuae.git Fix configuration list view root tree node doubleclick crash --- 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; }