diff options
author | Steve Northover <steve> | 2004-02-20 17:38:55 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2004-02-20 17:38:55 +0000 |
commit | c796b4db53e072130275c2f620c0d9b0db0c1b3b (patch) | |
tree | 4d027c08d935c55aef8871d0ada63a500edf4d8f /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java | |
parent | 595e36c1091cc208557835f05f82df10f72a7a04 (diff) | |
download | eclipse.platform.swt-c796b4db53e072130275c2f620c0d9b0db0c1b3b.tar.gz eclipse.platform.swt-c796b4db53e072130275c2f620c0d9b0db0c1b3b.tar.xz eclipse.platform.swt-c796b4db53e072130275c2f620c0d9b0db0c1b3b.zip |
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java index c9787ecac3..986854b142 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java @@ -864,7 +864,9 @@ public Point getSize () { if (count == 0) return new Point (0, 0); RECT rect = new RECT (); int hwndParent = parent.handle; - OS.GetMenuItemRect (hwndParent, handle, count - 1, rect); + if (!OS.GetMenuItemRect (hwndParent, handle, count - 1, rect)) { + return new Point (0, 0); + } int width = rect.right + 4; int height = rect.bottom + 4; return new Point (width, height); |