Commit be596aaa authored by Boris Barbulovski's avatar Boris Barbulovski Committed by Michal Marek

Add current selection check.

Signed-off-by: default avatarBoris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: default avatarThiago Macieira <thiago.macieira@intel.com>
[mmarek: I missed it in the original Qt5 patch set, which caused a crash]
Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
parent 588446a8
...@@ -400,6 +400,9 @@ void ConfigList::updateSelection(void) ...@@ -400,6 +400,9 @@ void ConfigList::updateSelection(void)
struct menu *menu; struct menu *menu;
enum prop_type type; enum prop_type type;
if (selectedItems().count() == 0)
return;
ConfigItem* item = (ConfigItem*)selectedItems().first(); ConfigItem* item = (ConfigItem*)selectedItems().first();
if (!item) if (!item)
return; return;
...@@ -1624,6 +1627,10 @@ void ConfigMainWindow::goBack(void) ...@@ -1624,6 +1627,10 @@ void ConfigMainWindow::goBack(void)
configList->setParentMenu(); configList->setParentMenu();
if (configList->rootEntry == &rootmenu) if (configList->rootEntry == &rootmenu)
backAction->setEnabled(false); backAction->setEnabled(false);
if (menuList->selectedItems().count() == 0)
return;
item = (ConfigItem*)menuList->selectedItems().first(); item = (ConfigItem*)menuList->selectedItems().first();
oldSelection = item; oldSelection = item;
while (item) { while (item) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment