]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix configuration list view root tree node doubleclick crash
authorToni Wilen <twilen@winuae.net>
Tue, 27 May 2025 16:00:37 +0000 (19:00 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 27 May 2025 16:00:37 +0000 (19:00 +0300)
od-win32/win32gui.cpp

index 5ea14ddb3a8e2191f4ccadf485fbedf83b276021..d905c00f395a59e80150e0db77f7c7242cb79cda 100644 (file)
@@ -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;
                                        }