Add safety check to Deleted::~Deleted for tear-down
It's possible that the Deleted gets created before destroying Workspace and due to the deleteLater outlives Workspace. In that case we may not call into Workspace as this might crash.
This commit is contained in:
parent
deb63fa344
commit
38f19dafb2
1 changed files with 3 additions and 1 deletions
|
@ -50,7 +50,9 @@ Deleted::~Deleted()
|
|||
if (delete_refcount != 0)
|
||||
qCCritical(KWIN_CORE) << "Deleted client has non-zero reference count (" << delete_refcount << ")";
|
||||
assert(delete_refcount == 0);
|
||||
if (workspace()) {
|
||||
workspace()->removeDeleted(this);
|
||||
}
|
||||
deleteEffectWindow();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue