Subject: f->output_data.w32->menubar_widget uninitialized?

From: Lennart Borgman <[email-masked]>
Date: Sun, 13 Jun 2010 20:01:37 +0200

I noticed some system call errors in free_frame_menu_bar so I tried to
nail it down:

void
free_frame_menubar (f)
     FRAME_PTR f;
{
  BLOCK_INPUT;

  {
    HMENU old = GetMenu (FRAME_W32_WINDOW (f));
    DebPrint (("free_frame_menubar.GetMenu.old=%d, f=%d, menubar_widget=%d",
               old, (FRAME_W32_WINDOW (f)),
f->output_data.w32->menubar_widget ));
    if (old)
      {
        if (!SetMenu (FRAME_W32_WINDOW (f), NULL))
          W32ASSERT (0, "free_frame_menubar.SetMenu");
        f->output_data.w32->menubar_widget = NULL;
        if (!DestroyMenu (old))
          W32ASSERT (0, "free_frame_menubar.DestroyMenu");
      }
  }

  UNBLOCK_INPUT;
}

This gave me the output below which seems to indicate that
menubar_widget is uninitialized:

  warning: free_frame_menubar.GetMenu.old=0, f=3146106, menubar_widget=329385

Where should it be initialized?