decorationbridge: Fix crash on plasma mobile

Summary:
For some reason there m_settings is null there, don't crash in this case.
The code definitely contemplates the possibility since it's null by default and on some DecorationBridge::reconfigure() paths.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, anthonyfieroni, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27809
This commit is contained in:
Aleix Pol 2020-03-03 19:06:52 +01:00
parent f9394d83f7
commit 17e6bd8587

View file

@ -311,6 +311,9 @@ QString settingsProperty(const QVariant &variant)
QString DecorationBridge::supportInformation() const
{
QString b;
if (m_noPlugin) {
b.append(QStringLiteral("Decorations are disabled"));
} else {
b.append(QStringLiteral("Plugin: %1\n").arg(m_plugin));
b.append(QStringLiteral("Theme: %1\n").arg(m_theme));
b.append(QStringLiteral("Plugin recommends border size: %1\n").arg(m_recommendedBorderSize.isNull() ? "No" : m_recommendedBorderSize));
@ -323,6 +326,7 @@ QString DecorationBridge::supportInformation() const
}
b.append(QStringLiteral("%1: %2\n").arg(property.name()).arg(settingsProperty(m_settings->property(property.name()))));
}
}
return b;
}