aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSnjezana Peco2014-02-13 09:40:00 (EST)
committerPaul Webster2014-02-13 09:40:00 (EST)
commit8340178277dfe57f5bf4048cf00e83b99f6229bc (patch)
treec8c8b78741f68c3e8878fd88e6fde40c8a366a8a
parent3b399d669f3241bbb547bc9addec6968fe1428f9 (diff)
downloadeclipse.platform.ui-8340178277dfe57f5bf4048cf00e83b99f6229bc.zip
eclipse.platform.ui-8340178277dfe57f5bf4048cf00e83b99f6229bc.tar.gz
eclipse.platform.ui-8340178277dfe57f5bf4048cf00e83b99f6229bc.tar.bz2
Bug 427843 - NPE when opening some Form editor on GTK3refs/changes/46/21946/1
Change-Id: I5ea3860c9a4c9d0e2a467f1b7240a0add67a8b02 Signed-off-by: Snjezana Peco <snjeza.peco@gmail.com>
-rw-r--r--bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java
index 4c34b96..d04679f 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java
@@ -804,6 +804,9 @@ public class FormHeading extends Canvas {
if (!isSeparatorVisible() && getBackgroundImage() == null)
return;
Rectangle carea = getClientArea();
+ if (carea.width == 0 || carea.height == 0) {
+ return;
+ }
Image buffer = new Image(getDisplay(), carea.width, carea.height);
buffer.setBackground(getBackground());
GC igc = new GC(buffer);