forked from len0rd/rockbox
fix a possible segfault upon invalid selection.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14262 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2f6f52d7e4
commit
e62040d5ed
1 changed files with 4 additions and 2 deletions
|
@ -109,8 +109,10 @@ void Config::accept()
|
||||||
|
|
||||||
// platform
|
// platform
|
||||||
QString nplat;
|
QString nplat;
|
||||||
nplat = ui.treeDevices->selectedItems().at(0)->data(0, Qt::UserRole).toString();
|
if(ui.treeDevices->selectedItems().size() != 0) {
|
||||||
userSettings->setValue("defaults/platform", nplat);
|
nplat = ui.treeDevices->selectedItems().at(0)->data(0, Qt::UserRole).toString();
|
||||||
|
userSettings->setValue("defaults/platform", nplat);
|
||||||
|
}
|
||||||
|
|
||||||
// sync settings
|
// sync settings
|
||||||
userSettings->sync();
|
userSettings->sync();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue