summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-05-10 09:34:59 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-05-10 09:36:23 -0400
commit9aa5c5b524701582a15646a49b2aee0612f6ce80 (patch)
tree96b654ee48addc7f7f69c6bde8a157ae8a27c2f1 /bundles
parentb62ae14dd9b1f58fa99654eedd942e7a30a66aeb (diff)
downloadeclipse.platform.swt-9aa5c5b524701582a15646a49b2aee0612f6ce80.tar.gz
eclipse.platform.swt-9aa5c5b524701582a15646a49b2aee0612f6ce80.tar.xz
eclipse.platform.swt-9aa5c5b524701582a15646a49b2aee0612f6ce80.zip
fix leak
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 818f311835..a5dc6842e5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -2397,12 +2397,14 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str
buffer = Converter.wcsToMbcs (null, chars, true);
}
int /*long*/ oldTooltip = OS.gtk_widget_get_tooltip_text (rootWidget);
+ boolean same = false;
if (buffer == null && oldTooltip == 0) {
- return;
+ same = true;
} else if (buffer != null && oldTooltip != 0) {
- if (OS.strcmp (oldTooltip, buffer) == 0) return;
+ same = OS.strcmp (oldTooltip, buffer) == 0;
}
if (oldTooltip != 0) OS.g_free(oldTooltip);
+ if (same) return;
OS.gtk_widget_set_tooltip_text (rootWidget, null);
/*
* Bug in GTK. In GTK 2.12, due to a miscalculation of window