Bug 574079 - [GTK3] Missing check for out-of-handles in Menu.createHandle()
Summary: [GTK3] Missing check for out-of-handles in Menu.createHandle()
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.17   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.21 M1   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-06-08 11:13 EDT by Simeon Andreev CLA
Modified: 2021-06-10 06:26 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Andreev CLA 2021-06-08 11:13:03 EDT
See changes for bug 567258, in particular: https://git.eclipse.org/c/platform/eclipse.platform.swt.git/diff/bundles/org.eclipse.swt/Eclipse%20SWT/gtk/org/eclipse/swt/widgets/Menu.java?id=6ba7d9620e9e07d91e3fc99bca758124bd1bbf27

The one of the two GTK3 cases is now missing an out-of-handles check:

if ((style & SWT.BAR) != 0) {
      handle = GTK3.gtk_menu_bar_new();
      if (handle == 0) error(SWT.ERROR_NO_HANDLES);

      long vboxHandle = parent.vboxHandle;
      GTK3.gtk_container_add(vboxHandle, handle);
      gtk_box_set_child_packing(vboxHandle, handle, false, true, 0, GTK.GTK_PACK_START);
} else {
      handle = GTK3.gtk_menu_new();
}
Comment 1 Eclipse Genie CLA 2021-06-10 04:02:16 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/181750