1
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:
S. Razi Alavizadeh 2013-07-13 02:31:24 +04:30
parent c313b2d961
commit b05ddc12db

View File

@ -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();
}