mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +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