diff options
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r-- | src/FbTk/Menu.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 4775ae9..b08bfe9 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -232,14 +232,16 @@ int Menu::remove(unsigned int index) { | |||
232 | if (item) { | 232 | if (item) { |
233 | menuitems.erase(it); | 233 | menuitems.erase(it); |
234 | 234 | ||
235 | if (!m_internal_menu && item->submenu() != 0) { | 235 | if (item->submenu() != 0) { |
236 | Menu *tmp = item->submenu(); | 236 | Menu *tmp = item->submenu(); |
237 | // if menu is interal we should just hide it instead | 237 | // if menu is internal we should just hide it instead |
238 | // if destroying it | 238 | // if destroying it |
239 | if (! tmp->m_internal_menu) { | 239 | if (! tmp->m_internal_menu) { |
240 | delete tmp; | 240 | delete tmp; |
241 | } else | 241 | } |
242 | tmp->internal_hide(); | 242 | // We can't internal_hide here, as the child may be deleted! |
243 | // } else | ||
244 | // tmp->internal_hide(); | ||
243 | } | 245 | } |
244 | 246 | ||
245 | 247 | ||