diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index c2fa30579e..030dfadb32 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -533,7 +533,10 @@ bool PresentWindowsEffect::borderActivated(ElectricBorder border) void PresentWindowsEffect::windowInputMouseEvent(QEvent *e) { - QMouseEvent* me = static_cast< QMouseEvent* >(e); + QMouseEvent* me = dynamic_cast< QMouseEvent* >(e); + if (!me) { + return; + } if (m_closeView) { const bool contains = m_closeView->geometry().contains(me->pos()); if (!m_closeView->isVisible() && contains) {