Skip to content

Commit

Permalink
Add current selection check.
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Barbulovski <[email protected]>
Signed-off-by: Thiago Macieira <[email protected]>
[mmarek: I missed it in the original Qt5 patch set, which caused a crash]
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
bokic authored and Michal Marek committed Nov 2, 2015
1 parent 588446a commit be596aa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit be596aa

Please sign in to comment.