Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Bullen2017-11-21 14:56:55 -0500
committerAlexander Kurtakov2017-11-21 15:00:59 -0500
commit8017c6fdf631cea1fcc84c58f293e750de63b6c7 (patch)
treec410c908f1a6d5b6328ba71136487e358e9839ff /org.eclipse.ui.genericeditor.tests
parentb3b9006b1a0f94086ab1779ab14d8b5ae950b741 (diff)
downloadeclipse.platform.text-8017c6fdf631cea1fcc84c58f293e750de63b6c7.tar.gz
eclipse.platform.text-8017c6fdf631cea1fcc84c58f293e750de63b6c7.tar.xz
eclipse.platform.text-8017c6fdf631cea1fcc84c58f293e750de63b6c7.zip
Bug 527577 - [Generic Editor] NPE in highlighter
Confirm the sourceViewer has a textWidget when performing the getCaretOffset asynchronously Change-Id: Ieb5cdefcd8c25f1df0d2badb092c0eb90a8ed20a Signed-off-by: Lucas Bullen <lbullen@redhat.com>
Diffstat (limited to 'org.eclipse.ui.genericeditor.tests')
-rw-r--r--org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightStrategy.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightStrategy.java b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightStrategy.java
index 0785d808b..fe71a1a9f 100644
--- a/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightStrategy.java
+++ b/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/contributions/HighlightStrategy.java
@@ -107,7 +107,7 @@ public class HighlightStrategy implements IReconcilingStrategy, IReconcilingStra
public void initialReconcile() {
if (sourceViewer != null) {
sourceViewer.getTextWidget().getDisplay().asyncExec(() -> {
- if (sourceViewer != null) {
+ if (sourceViewer != null && sourceViewer.getTextWidget() != null) {
applyHighlights();
}
});

Back to the top