plasma: check the display outside the loop in Plasma::DialogShadowsPrivate::freeX11Pixmaps()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-14 14:49:53 +03:00
parent 245a161cc8
commit c3a344c4af

View file

@ -297,10 +297,11 @@ void DialogShadowsPrivate::setupData(Plasma::FrameSvg::EnabledBorders enabledBor
void DialogShadowsPrivate::freeX11Pixmaps()
{
#ifdef Q_WS_X11
if (!QX11Info::display()) {
return;
}
foreach (KPixmap &pixmap, m_shadowPixmaps) {
if (!QX11Info::display()) {
return;
}
if (!pixmap.isNull()) {
pixmap.release();
}