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)
struct menu *menu;
enum prop_type type;
if (selectedItems().count() == 0)
return;
ConfigItem* item = (ConfigItem*)selectedItems().first();
if (!item)
return;
......@@ -1624,6 +1627,10 @@ void ConfigMainWindow::goBack(void)
configList->setParentMenu();
if (configList->rootEntry == &rootmenu)
backAction->setEnabled(false);
if (menuList->selectedItems().count() == 0)
return;
item = (ConfigItem*)menuList->selectedItems().first();
oldSelection = 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