Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlgoubet2019-09-19 07:31:29 -0400
committerlgoubet2019-09-19 07:34:53 -0400
commiteebd410a09df9461857f27a090e5f0b77a823d4e (patch)
tree2d8713aa0d5c55cc9014cf5c68b7c7f15b6cce87
parent5074797c0219b87449b5692a1521d7cfaafb9420 (diff)
downloadorg.eclipse.emf.compare-eebd410a09df9461857f27a090e5f0b77a823d4e.tar.gz
org.eclipse.emf.compare-eebd410a09df9461857f27a090e5f0b77a823d4e.tar.xz
org.eclipse.emf.compare-eebd410a09df9461857f27a090e5f0b77a823d4e.zip
Potential NPE with some implementations of the property sheet pages
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java
index 871b82b24..0ef734b56 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/contentmergeviewer/EMFCompareContentMergeViewer.java
@@ -747,8 +747,12 @@ public abstract class EMFCompareContentMergeViewer extends ContentMergeViewer im
propertySheetPage.setPropertySourceProvider(fAdapterFactoryContentProvider);
getControl().addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
- propertySheetPage.selectionChanged(activePart, null);
propertySheetPage.setPropertySourceProvider(null);
+ // bug 551238 : protect from potential NPEs
+ if (propertySheetPage.getControl() != null
+ && !propertySheetPage.getControl().isDisposed()) {
+ propertySheetPage.selectionChanged(activePart, null);
+ }
}
});
if (newSelectedObject != null) {

Back to the top