changeset 107878:faaa7a6517a8

* xmenu.c (apply_systemfont_to_menu): *childs was incorrectly used.
author Jan D <jan.h.d@swipnet.se>
date Fri, 16 Apr 2010 19:05:31 +0200
parents c08a2125a665
children 65450964c877
files src/xmenu.c
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Fri Apr 16 19:05:20 2010 +0200
+++ b/src/xmenu.c	Fri Apr 16 19:05:31 2010 +0200
@@ -978,14 +978,9 @@
   if (XtIsShell (w)) /* popup menu */
     {
       Widget *childs = NULL;
-      int num = 0;
-
-      XtVaGetValues (w, XtNnumChildren, &num, NULL);
-      if (num != 1) return; /* Should only be one. */
-
-      childs[0] = 0;
+
       XtVaGetValues (w, XtNchildren, &childs, NULL);
-      if (childs && *childs) w = *childs;
+      if (*childs) w = *childs;
     }
 
   /* Only use system font if the default is used for the menu.  */