This commit is contained in:
fluxgen 2002-08-04 15:26:00 +00:00
parent 4f6e9bc87e
commit 024d181abb

View file

@ -132,9 +132,10 @@ Window Rootmenu::useAutoGroupWindow()
auto_group_window = 0; // clear it immediately auto_group_window = 0; // clear it immediately
// If not set check the parent and the parent's parent, ... // If not set check the parent and the parent's parent, ...
else { else {
Rootmenu* parent = dynamic_cast<Rootmenu*>(GetParent()); // TODO: dynamic_cast throws std::bad_cast!
if (parent) Rootmenu *p = dynamic_cast<Rootmenu*>(parent());
w = parent->useAutoGroupWindow(); if (p)
w = p->useAutoGroupWindow();
} }
return w; return w;
} }