| author | Carolyn MacLeod | 2012-06-18 14:21:01 (EDT) |
|---|---|---|
| committer | Bogdan Gheorghe | 2012-11-21 11:26:00 (EST) |
| commit | 9efef2504d71a1f3dabca0ee9c4c8c10c8b77046 (patch) (side-by-side diff) | |
| tree | 9f6f2557232eb41620d992a8e4ec18f35b628e71 | |
| parent | 2dab657d7c1d1d7903ef9c169441dc99db1ec70b (diff) | |
| download | eclipse.platform.swt-9efef2504d71a1f3dabca0ee9c4c8c10c8b77046.zip eclipse.platform.swt-9efef2504d71a1f3dabca0ee9c4c8c10c8b77046.tar.gz eclipse.platform.swt-9efef2504d71a1f3dabca0ee9c4c8c10c8b77046.tar.bz2 | |
Bug 339342 - CTabFolder should throw IllegalArgumentException when a
disposed control is set as its top right control
| -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 2f0c355..52c2d8b 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; |

