summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-01-14 08:43:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-01-14 08:43:02 +0000
commit8faf41f61815681cb27b824967f42f0b848c9549 (patch)
tree7e0ee3c3eed55203ce9641e6d3c571ea5dea3dd7 /src
parent0e5c27f784bd64808054fee551287657d990c4fa (diff)
fix against endless recursion
git-svn-id: http://svn.miranda-ng.org/main/trunk@16089 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/menu_utils.cpp5
1 files changed, 5 insertions, 0 deletions
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;
}