Bug 379791 - SWTException: Graphic is disposed for PlaceholderImpl
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
index 3613304..a2416a4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
@@ -282,7 +282,7 @@
 					CTabItem item = parent.items[part]; 
 					if (item.isDisposed()) return new Point(0,0);
 					Image image = item.getImage();
-					if (image != null) { 
+					if (image != null && !image.isDisposed()) {
 						Rectangle bounds = image.getBounds();
 						if ((state & SWT.SELECTED) != 0 || parent.showUnselectedImage) {
 							width += bounds.width;
@@ -1409,7 +1409,7 @@
 			int xDraw = x - trim.x;
 			if (parent.single && (parent.showClose || item.showClose)) xDraw += item.closeRect.width; 
 			Image image = item.getImage();
-			if (image != null) {
+			if (image != null && !image.isDisposed()) {
 				Rectangle imageBounds = image.getBounds();
 				// only draw image if it won't overlap with close button
 				int maxImageWidth = rightEdge - xDraw - (trim.width + trim.x);
@@ -1613,7 +1613,7 @@
 			Rectangle trim = computeTrim(index, SWT.NONE, 0, 0, 0, 0);
 			int xDraw = x - trim.x;
 			Image image = item.getImage();
-			if (image != null && parent.showUnselectedImage) {
+			if (image != null && !image.isDisposed() && parent.showUnselectedImage) {
 				Rectangle imageBounds = image.getBounds();
 				// only draw image if it won't overlap with close button
 				int maxImageWidth = x + width - xDraw - (trim.width + trim.x);