summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Destroy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Destroy.c b/src/Destroy.c
index 9595bed..deffc8f 100644
--- a/src/Destroy.c
+++ b/src/Destroy.c
@@ -195,11 +195,10 @@ Phase2Destroy(register Widget widget)
static Boolean
IsDescendant(Widget widget, const Widget root)
{
- while ((widget = XtParent(widget)) != root) {
- if (widget == NULL)
- return False;
+ while (widget != NULL && (widget = XtParent(widget)) != root) {
+ ;
}
- return True;
+ return (widget != NULL) ? True : False;
}
static void