Don't crash on tear-down of Workspace if run without X11 support
Much easier than expected.
This commit is contained in:
parent
8ae37c420b
commit
0c8c047d78
2 changed files with 7 additions and 2 deletions
|
@ -129,7 +129,9 @@ RootInfo *RootInfo::create()
|
|||
|
||||
void RootInfo::destroy()
|
||||
{
|
||||
Q_ASSERT(s_self);
|
||||
if (!s_self) {
|
||||
return;
|
||||
}
|
||||
xcb_window_t supportWindow = s_self->supportWindow();
|
||||
delete s_self;
|
||||
s_self = NULL;
|
||||
|
|
|
@ -512,7 +512,10 @@ Workspace::~Workspace()
|
|||
Client::cleanupX11();
|
||||
for (UnmanagedList::iterator it = unmanaged.begin(), end = unmanaged.end(); it != end; ++it)
|
||||
(*it)->release(ReleaseReason::KWinShutsDown);
|
||||
xcb_delete_property(connection(), rootWindow(), atoms->kwin_running);
|
||||
|
||||
if (auto c = kwinApp()->x11Connection()) {
|
||||
xcb_delete_property(c, kwinApp()->x11RootWindow(), atoms->kwin_running);
|
||||
}
|
||||
|
||||
for (auto it = deleted.begin(); it != deleted.end();) {
|
||||
emit deletedRemoved(*it);
|
||||
|
|
Loading…
Reference in a new issue