Skip to content

plugins/slidingpopups: Always ref window when sliding it offscreen

Imagine the following case:

  • the window is hidden, slideOut() is called but no deleted reference is created because the window is not deleted
  • the window is closed, slideOut() won't be called because the window is hidden and SlidingPopupsEffect::slotWindowClosed() ignores closed windows that are already hidden
  • the window is deleted in meanwhile
  • the sliding popups effects attempt to delete m_animations[w] entry, but since "w" is a dangling pointer at this point, visibleRef is going to access released memory

To fix that, make slideOut() always ref the window.

Edited by Vlad Zahorodnii

Merge request reports

Loading