diff options
author | Carsten Reckord | 2014-09-29 10:43:33 +0000 |
---|---|---|
committer | Carsten Reckord | 2014-09-29 10:43:33 +0000 |
commit | 751473f3721540cbca9a734584c0e34f75f54768 (patch) | |
tree | cf88c54b9176e7ade3af8946b165abeb2325f85e | |
parent | cfdf2af2ba56d3003b79c2692b4451fceb77fd19 (diff) | |
download | org.eclipse.epp.mpc-751473f3721540cbca9a734584c0e34f75f54768.tar.gz org.eclipse.epp.mpc-751473f3721540cbca9a734584c0e34f75f54768.tar.xz org.eclipse.epp.mpc-751473f3721540cbca9a734584c0e34f75f54768.zip |
445301: NPE below MarketplaceWizardCommand.execute (err_grp: fbe4d1f5)
- catch null image returned by ImageRegistry
Bug: 445301
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=445301
-rw-r--r-- | org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/CatalogSwitcher.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/CatalogSwitcher.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/CatalogSwitcher.java index 4457dd52..68f092b4 100644 --- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/CatalogSwitcher.java +++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/CatalogSwitcher.java @@ -157,7 +157,7 @@ public class CatalogSwitcher extends Composite implements ISelectionProvider { NLS.bind(Messages.CatalogSwitcher_downloadCatalogImage, catalogDescriptor.getLabel()), 1); final Image image = getCatalogIcon(catalogDescriptor); monitor.worked(1); - if (!label.isDisposed()) { // recheck - getCatalogIcon can take a bit if it needs to download the image... + if (image != null && !label.isDisposed()) { // recheck - getCatalogIcon can take a bit if it needs to download the image... label.getDisplay().asyncExec(new Runnable() { public void run() { @@ -193,6 +193,9 @@ public class CatalogSwitcher extends Composite implements ISelectionProvider { } imageRegistry.put(key, catalogIcon); image = imageRegistry.get(key); + if (image == null) { + return getDefaultCatalogImage(); + } } return image; } |