mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
Add current selection check.
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> [mmarek: I missed it in the original Qt5 patch set, which caused a crash] Signed-off-by: Michal Marek <mmarek@suse.com>
This commit is contained in:
parent
588446a847
commit
be596aaa74
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user