Commit 0c8c047d authored by Martin Flöser's avatar Martin Flöser

Don't crash on tear-down of Workspace if run without X11 support

Much easier than expected.
parent 8ae37c42
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment