(svn r22145) -Codechange: Do explicit test for non-bool values.

This commit is contained in:
alberth
2011-02-25 22:04:38 +00:00
parent a14f4eb271
commit 9222a30173
14 changed files with 31 additions and 31 deletions

View File

@@ -2559,9 +2559,9 @@ static int MakeWidgetTree(const NWidgetPart *parts, int count, NWidgetBase **par
}
/* Add sub_widget to parent container if available, otherwise return the widget to the caller. */
if (nwid_cont) nwid_cont->Add(sub_widget);
if (nwid_parent) nwid_parent->Add(sub_widget);
if (!nwid_cont && !nwid_parent) {
if (nwid_cont != NULL) nwid_cont->Add(sub_widget);
if (nwid_parent != NULL) nwid_parent->Add(sub_widget);
if (nwid_cont == NULL && nwid_parent == NULL) {
*parent = sub_widget;
return total_used;
}