Only cleanup XRenderUtils is we actually created it

Summary: BUG: 386430

Test Plan:
kwin_x11 --crashes 20
Got a dialog. Hit cancel. It didn't crash

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8593
This commit is contained in:
David Edmundson 2017-11-01 15:45:18 +00:00
parent ca6459145c
commit 449c93362b

View file

@ -87,7 +87,9 @@ X11StandalonePlatform::~X11StandalonePlatform()
m_openGLFreezeProtectionThread->wait();
delete m_openGLFreezeProtectionThread;
}
XRenderUtils::cleanup();
if (isReady()) {
XRenderUtils::cleanup();
}
}
void X11StandalonePlatform::init()