fix: nullptr access
style can't always be created Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
60e279bf39
commit
83ebb5984b
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ SystemTheme::SystemTheme(const QString& styleName, const QPalette& defaultPalett
|
|||
m_colorPalette = defaultPalette;
|
||||
} else {
|
||||
auto style = QStyleFactory::create(styleName);
|
||||
m_colorPalette = style->standardPalette();
|
||||
m_colorPalette = style != nullptr ? style->standardPalette() : defaultPalette;
|
||||
delete style;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue