[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kwin] /: Don't crash on tear-down of Workspace if run without X11 support
From: Martin_Flöser <null () kde ! org>
Date: 2017-09-30 11:31:39
Message-ID: E1dyFzf-000326-5f () code ! kde ! org
[Download RAW message or body]
Git commit 0c8c047d788e8849d52cf3966d84ddd1a69492d2 by Martin Flöser.
Committed on 30/09/2017 at 11:31.
Pushed by graesslin into branch 'master'.
Don't crash on tear-down of Workspace if run without X11 support
Much easier than expected.
M +3 -1 netinfo.cpp
M +4 -1 workspace.cpp
https://commits.kde.org/kwin/0c8c047d788e8849d52cf3966d84ddd1a69492d2
diff --git a/netinfo.cpp b/netinfo.cpp
index 8589a774d..8a594ed53 100644
--- a/netinfo.cpp
+++ b/netinfo.cpp
@@ -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;
diff --git a/workspace.cpp b/workspace.cpp
index 2dc16a31f..a70f023ba 100644
--- a/workspace.cpp
+++ b/workspace.cpp
@@ -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);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic