From: Boris Barbulovski Date: Tue, 22 Sep 2015 18:36:28 +0000 (-0700) Subject: Add current selection check. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=be596aaa74090f553c61505ad03bb7a7460e5d23;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Add current selection check. Signed-off-by: Boris Barbulovski Signed-off-by: Thiago Macieira [mmarek: I missed it in the original Qt5 patch set, which caused a crash] Signed-off-by: Michal Marek --- diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 73ce56a76271..91b7e6fbc364 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -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) {