diff options
author | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2012-06-18 14:21:01 -0400 |
---|---|---|
committer | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2012-06-18 14:21:01 -0400 |
commit | f5471f1dce5662b63a70164ff03da95148af503a (patch) | |
tree | c662957007906d4526d6ff096084130f7bac20d5 /bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java | |
parent | 43782d41bf6e68d6d0f0c17b2b5cc18389b23a24 (diff) | |
download | eclipse.platform.swt-f5471f1dce5662b63a70164ff03da95148af503a.tar.gz eclipse.platform.swt-f5471f1dce5662b63a70164ff03da95148af503a.tar.xz eclipse.platform.swt-f5471f1dce5662b63a70164ff03da95148af503a.zip |
Bug 339342 - CTabFolder should throw IllegalArgumentException when a
disposed control is set as its top right control
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java index 1f0716f728..aff349a216 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java @@ -3371,7 +3371,7 @@ public void setTabPosition(int position) { * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> - * <li>ERROR_INVALID_ARGUMENT - if the control is not a child of this CTabFolder</li> + * <li>ERROR_INVALID_ARGUMENT - if the control is disposed, or not a child of this CTabFolder</li> * </ul> * * @since 2.1 @@ -3400,7 +3400,7 @@ public void setTopRight(Control control) { * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> - * <li>ERROR_INVALID_ARGUMENT - if the control is not a child of this CTabFolder</li> + * <li>ERROR_INVALID_ARGUMENT - if the control is disposed, or not a child of this CTabFolder</li> * </ul> * * @since 3.0 @@ -3410,7 +3410,7 @@ public void setTopRight(Control control, int alignment) { if (alignment != SWT.RIGHT && alignment != SWT.FILL && alignment != (SWT.RIGHT | SWT.WRAP)) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } - if (control != null && control.getParent() != this) { + if (control != null && (control.isDisposed() || control.getParent() != this)) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } if (topRight == control && topRightAlignment == alignment) return; |