aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Rootmenu.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Rootmenu.cc b/src/Rootmenu.cc
index 66df012..513a971 100644
--- a/src/Rootmenu.cc
+++ b/src/Rootmenu.cc
@@ -132,9 +132,10 @@ Window Rootmenu::useAutoGroupWindow()
132 auto_group_window = 0; // clear it immediately 132 auto_group_window = 0; // clear it immediately
133 // If not set check the parent and the parent's parent, ... 133 // If not set check the parent and the parent's parent, ...
134 else { 134 else {
135 Rootmenu* parent = dynamic_cast<Rootmenu*>(GetParent()); 135 // TODO: dynamic_cast throws std::bad_cast!
136 if (parent) 136 Rootmenu *p = dynamic_cast<Rootmenu*>(parent());
137 w = parent->useAutoGroupWindow(); 137 if (p)
138 w = p->useAutoGroupWindow();
138 } 139 }
139 return w; 140 return w;
140} 141}