From 449c93362b9ae3321a018fbd349c6c0348c5489b Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 1 Nov 2017 15:45:18 +0000 Subject: [PATCH] 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 --- plugins/platforms/x11/standalone/x11_platform.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/platforms/x11/standalone/x11_platform.cpp b/plugins/platforms/x11/standalone/x11_platform.cpp index 75dc804bad..36f65a19a4 100644 --- a/plugins/platforms/x11/standalone/x11_platform.cpp +++ b/plugins/platforms/x11/standalone/x11_platform.cpp @@ -87,7 +87,9 @@ X11StandalonePlatform::~X11StandalonePlatform() m_openGLFreezeProtectionThread->wait(); delete m_openGLFreezeProtectionThread; } - XRenderUtils::cleanup(); + if (isReady()) { + XRenderUtils::cleanup(); + } } void X11StandalonePlatform::init()