Bug 341227 [Compatibility] Invalid thread access thrown when running JDT Debug's ProjectCreationDecorator test
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index f8a83a6..c79fd1c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
@@ -1842,9 +1842,10 @@
 	public void showHeapStatus(boolean show) {
 		MUIElement hsElement = modelService.find(
 				"org.eclipse.ui.HeapStatus", modelService.getTrim(model, SideValue.BOTTOM)); //$NON-NLS-1$
-		if (hsElement != null)
+		if (hsElement != null && hsElement.isToBeRendered() != show) {
 			hsElement.setToBeRendered(show);
-		getShell().layout(null, SWT.ALL | SWT.CHANGED | SWT.DEFER);
+			getShell().layout(null, SWT.ALL | SWT.CHANGED | SWT.DEFER);
+		}
 	}
 
 	/**