Sanitize special window pointers in flip/coverswitch

CCBUG:253870
remotes/origin/Plasma/5.0
Thomas Lübking 15 years ago
parent 48939462da
commit a23e01f0d9
  1. 2
      effects/coverswitch/coverswitch.cpp
  2. 2
      effects/flipswitch/flipswitch.cpp

@ -988,6 +988,8 @@ void CoverSwitchEffect::abort()
void CoverSwitchEffect::slotWindowClosed(EffectWindow* c)
{
if (c == selected_window)
selected_window = 0;
// if the list is not empty, the effect is active
if (!currentWindowList.isEmpty()) {
c->refWindow();

@ -591,6 +591,8 @@ void FlipSwitchEffect::slotWindowAdded(EffectWindow* w)
void FlipSwitchEffect::slotWindowClosed(EffectWindow* w)
{
if (m_selectedWindow == w)
m_selectedWindow = 0;
if (m_active && m_windows.contains(w)) {
m_windows.remove(w);
}

Loading…
Cancel
Save