Don't handle closing windows while BoxSwitch is inactive

This might be the cause for ghost windows, because they got
referrenced without being unreferrenced again.
CCBUG: 259640
This commit is contained in:
Martin Gräßlin 2011-11-01 06:48:21 +01:00
parent f58653bdcd
commit 6a94ff5641

View file

@ -487,6 +487,9 @@ void BoxSwitchEffect::setSelectedWindow(EffectWindow* w)
void BoxSwitchEffect::slotWindowClosed(EffectWindow* w)
{
if (!mActivated) {
return;
}
if (w == selected_window) {
setSelectedWindow(0);
}