Skip to content

Commit

Permalink
[PATCH] qconf: (re)fix SIGSEGV on empty menu items
Browse files Browse the repository at this point in the history
Back out the recent fix for this bug, fix it by correctly initialising
ConfigInfoView.sym.

Signed-off-by: Roman Zippel <[email protected]>
Cc: "Cyrill V. Gorcunov" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Roman Zippel authored and Linus Torvalds committed Jan 12, 2007
1 parent a2f3aa0 commit 6fa1da8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 4 additions & 11 deletions scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -917,16 +917,14 @@ void ConfigView::updateListAll(void)
}

ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
: Parent(parent, name), menu(0)
: Parent(parent, name), menu(0), sym(0)
{
if (name) {
configSettings->beginGroup(name);
_showDebug = configSettings->readBoolEntry("/showDebug", false);
configSettings->endGroup();
connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
}

has_dbg_info = 0;
}

void ConfigInfoView::saveSettings(void)
Expand Down Expand Up @@ -955,13 +953,11 @@ void ConfigInfoView::setInfo(struct menu *m)
if (menu == m)
return;
menu = m;
if (!menu) {
has_dbg_info = 0;
sym = NULL;
if (!menu)
clear();
} else {
has_dbg_info = 1;
else
menuInfo();
}
}

void ConfigInfoView::setSource(const QString& name)
Expand Down Expand Up @@ -996,9 +992,6 @@ void ConfigInfoView::symbolInfo(void)
{
QString str;

if (!has_dbg_info)
return;

str += "<big>Symbol: <b>";
str += print_filter(sym->name);
str += "</b></big><br><br>value: ";
Expand Down
2 changes: 0 additions & 2 deletions scripts/kconfig/qconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,6 @@ public slots:
struct symbol *sym;
struct menu *menu;
bool _showDebug;

int has_dbg_info;
};

class ConfigSearchWindow : public QDialog {
Expand Down

0 comments on commit 6fa1da8

Please sign in to comment.