Diffusion Krita 84c95ef6c50d

419140 Fix use-after-free in the resource server

Authored by lsegovia on Jun 25 2020, 1:23 AM.

Description

419140 Fix use-after-free in the resource server

Sometimes (under Windows), the main window (and the palette docker)
gets destroyed before the palettes' resource server. Since the docker
does not remove itself as an observer in its destructor, the resource
server will do it on destruction -- thus trying to access a long dead
object.

It is interesting to see that this use-after-free happens:

  • 100% reliably on Windows only
  • and, to the best of my knowledge, with debug builds.

BUG: 419140
CCMAIL: kimageshop@kde.org

(cherry picked from commit 4cf116cbe65901146edc4c0de5a6d62a89c41172)

Details