diff --git a/effects/snaphelper/snaphelper.cpp b/effects/snaphelper/snaphelper.cpp index 733dcde0d3..a4857e5e38 100644 --- a/effects/snaphelper/snaphelper.cpp +++ b/effects/snaphelper/snaphelper.cpp @@ -163,13 +163,20 @@ void SnapHelperEffect::postPaintScreen() }*/ } else if( m_window ) + { + if( m_window->isDeleted() ) + m_window->unrefWindow(); m_window = NULL; + } } void SnapHelperEffect::windowClosed( EffectWindow* w ) { if( m_window == w ) + { + m_window->refWindow(); m_active = false; + } } void SnapHelperEffect::windowUserMovedResized( EffectWindow* w, bool first, bool last )