Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 328944
Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java (-4 / +11 lines)
Lines 444-453 Link Here
444
				partService.showPart(part, PartState.CREATE);
444
				partService.showPart(part, PartState.CREATE);
445
			}
445
			}
446
446
447
			CompatibilityPart compatibilityPart = (CompatibilityPart) part.getObject();
447
			// check if we were actually created, it is insufficient to check
448
			if (compatibilityPart != null) {
448
			// whether the 'object' feature is valid or not because it is one of
449
				legacyPart = compatibilityPart.getPart();
449
			// the last things to be unset during the teardown process, this
450
				addPropertyListeners();
450
			// means we may return a valid workbench part even if it is actually
451
			// in the process of being destroyed, see bug 328944
452
			if (part.getWidget() != null) {
453
				CompatibilityPart compatibilityPart = (CompatibilityPart) part.getObject();
454
				if (compatibilityPart != null) {
455
					legacyPart = compatibilityPart.getPart();
456
					addPropertyListeners();
457
				}
451
			}
458
			}
452
		}
459
		}
453
		return legacyPart;
460
		return legacyPart;

Return to bug 328944