* xmenu.c (apply_systemfont_to_menu): *childs was incorrectly used.
authorJan D <jan.h.d@swipnet.se>
Fri, 16 Apr 2010 17:05:31 +0000 (19:05 +0200)
committerJan D <jan.h.d@swipnet.se>
Fri, 16 Apr 2010 17:05:31 +0000 (19:05 +0200)
src/ChangeLog
src/xmenu.c

index 789f7dc..99d41c6 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-16  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xmenu.c (apply_systemfont_to_menu): *childs was incorrectly used.
+
 2010-04-16  Ken Brown  <kbrown@cornell.edu>  (tiny change)
 
        * s/cygwin.h: Avoid linking against static libgcc.
index c8067a4..796dd30 100644 (file)
@@ -978,14 +978,9 @@ apply_systemfont_to_menu (w)
   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.  */