Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Reckord2015-12-16 10:17:40 -0500
committerThomas Watson2016-08-17 12:34:05 -0400
commita01e7659bf73d038eeec25c07986dbb60b1a4afb (patch)
tree2303b4669bfe793d90f996c9f63aae86ceecbfe4
parent617698558fa305607f1f37b2240b00d69658d709 (diff)
downloadrt.equinox.p2-a01e7659bf73d038eeec25c07986dbb60b1a4afb.tar.gz
rt.equinox.p2-a01e7659bf73d038eeec25c07986dbb60b1a4afb.tar.xz
rt.equinox.p2-a01e7659bf73d038eeec25c07986dbb60b1a4afb.zip
Bug 482765 - NullPointerException in TextSearchControl.createLabelButtonControl(198)
Changed the broken icon path to point to the png version. Fall back to "missing image" descriptor when the provided descriptor is null. Change-Id: I3fb3cdd08ea7413f388661f2657070710463620e Signed-off-by: Carsten Reckord <reckord@yatta.de>
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
index 490b8fb8a..5f545f7db 100644
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
+++ b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
@@ -62,7 +62,7 @@ public class TextSearchControl extends Composite {
* Get image descriptors for the clear button.
*/
static {
- ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PlatformUI.PLUGIN_ID, "$nl$/icons/full/etool16/clear_co.gif"); //$NON-NLS-1$
+ ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PlatformUI.PLUGIN_ID, "$nl$/icons/full/etool16/clear_co.png"); //$NON-NLS-1$
if (descriptor != null) {
JFaceResources.getImageRegistry().put(CLEAR_ICON, descriptor);
}
@@ -195,7 +195,7 @@ public class TextSearchControl extends Composite {
final Image nativeImage = parent.getDisplay().getSystemImage(detail);
- final Image activeImage = nativeImage != null ? nativeImage : activeImageDescriptor.createImage();
+ final Image activeImage = nativeImage != null ? nativeImage : activeImageDescriptor == null ? ImageDescriptor.getMissingImageDescriptor().createImage() : activeImageDescriptor.createImage();
final Image inactiveImage = new Image(parent.getDisplay(), activeImage, SWT.IMAGE_GRAY);
final Image pressedImage = inactiveImage;

Back to the top