QmlDesigner: Fix crash

Task-number: QDS-9009
Change-Id: Id2c862e1890ecfc0f2d14bf58eb6cb4c5112d0ba
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2023-02-01 11:06:22 +01:00
parent 0198ed15f3
commit 4597317d2d
2 changed files with 4 additions and 1 deletions

View File

@@ -636,7 +636,7 @@ QLinearGradient StyleHelper::statusBarGradient(const QRect &statusBarRect)
bool StyleHelper::isQDSTheme()
{
return creatorTheme()->flag(Theme::QDSTheme);
return creatorTheme() ? creatorTheme()->flag(Theme::QDSTheme) : false;
}
QIcon StyleHelper::getIconFromIconFont(const QString &fontName, const QList<IconFontHelper> &parameters)

View File

@@ -91,6 +91,9 @@ Theme::Theme(Theme *originTheme, QObject *parent)
Theme::~Theme()
{
if (this == m_creatorTheme)
m_creatorTheme = nullptr;
delete d;
}