Commit 6d60f01a authored by Martin Flöser's avatar Martin Flöser

Skip DontCrashEmptyDecorationTest if we don't have a /dev/dri/card0 device

Without the /dev/dri/card0 mesa fails to initialize egl and the test
fails. In order to silence the failure till the system provides the
device file, we better skip the test.

A nullptr crash in that case is fixed in WaylandServer tear-down.
parent 8b2e032f
......@@ -70,6 +70,9 @@ private:
void DontCrashEmptyDecorationTest::initTestCase()
{
if (!QFile::exists(QStringLiteral("/dev/dri/card0"))) {
QSKIP("Needs a dri device");
}
qRegisterMetaType<KWin::ShellClient*>();
qRegisterMetaType<KWin::AbstractClient*>();
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
......
......@@ -97,9 +97,11 @@ void WaylandServer::terminateClientConnections()
{
destroyInternalConnection();
destroyInputMethodConnection();
const auto connections = m_display->connections();
for (auto it = connections.begin(); it != connections.end(); ++it) {
(*it)->destroy();
if (m_display) {
const auto connections = m_display->connections();
for (auto it = connections.begin(); it != connections.end(); ++it) {
(*it)->destroy();
}
}
}
......
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