Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
index 021451528..8337ad85a 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
@@ -325,14 +325,20 @@ public class CompareConfiguration {
* disposed when the <code>dispose</code> method is called.
*
* @param kind the kind of change as defined in <code>Differencer</code>.
- * @return an modification of the base image reflecting the kind of change.
+ * @return an modification of the base image reflecting the kind of change
+ * or {@code null} if there is no image descriptor registered for
+ * given id.
* @see org.eclipse.compare.structuremergeviewer.Differencer
* @since 2.0
*/
public Image getImage(int kind) {
- if (fDisposed)
+ if (fDisposed) {
return null;
+ }
ImageDescriptor id= getImageDescriptor(kind);
+ if (id == null) {
+ return null;
+ }
ResourceManager rm = getResourceManager();
return rm.createImage(id);
}

Back to the top