From 8faf41f61815681cb27b824967f42f0b848c9549 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 14 Jan 2016 08:43:02 +0000 Subject: fix against endless recursion git-svn-id: http://svn.miranda-ng.org/main/trunk@16089 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/menu_utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp index 4fd6bc56a9..d06a1e0263 100644 --- a/src/mir_app/src/menu_utils.cpp +++ b/src/mir_app/src/menu_utils.cpp @@ -1041,6 +1041,11 @@ int Menu_LoadFromDatabase(TMO_IntMenuItem *pimi, void *szModule) if (p == NULL) return 0; + if (p == pimi) { // prevent a loop + Netlib_Logf(NULL, "MENU: preventing endless loop in %s", menuItemName); + return 0; + } + pimi->mi.root = p; pNew = &p->submenu; } -- cgit v1.2.3