mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[ThemeManager] Fixed crash on saving settings when theme is unavailable.
This commit is contained in:
parent
c313b2d961
commit
b05ddc12db
|
@ -161,9 +161,14 @@ ThemeManager::Theme ThemeManager::parseTheme(const QString &path, const QString
|
|||
|
||||
void ThemeManager::save()
|
||||
{
|
||||
QListWidgetItem* currentItem = ui->listWidget->currentItem();
|
||||
if (!currentItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
Settings settings;
|
||||
settings.beginGroup("Themes");
|
||||
settings.setValue("activeTheme", ui->listWidget->currentItem()->data(Qt::UserRole));
|
||||
settings.setValue("activeTheme", currentItem->data(Qt::UserRole));
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user