diff options
author | Dani Megert | 2017-11-14 13:55:20 +0000 |
---|---|---|
committer | Dani Megert | 2017-11-14 13:57:22 +0000 |
commit | e94c8555078f13f37fa76125fc0e6696cf331106 (patch) | |
tree | 3927b229db2a6c581602d04b2169907b98234077 | |
parent | 9099f6d9165b09c6c1fe218ab1c7ed977745e00c (diff) | |
download | eclipse.platform.text-e94c8555078f13f37fa76125fc0e6696cf331106.tar.gz eclipse.platform.text-e94c8555078f13f37fa76125fc0e6696cf331106.tar.xz eclipse.platform.text-e94c8555078f13f37fa76125fc0e6696cf331106.zip |
Fixed bug 518997: [implementation] NPE in HTML2TextReader.finishAndReinitializeCurrentStyle
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java index 026b7639a1c..499032a0466 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2016 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -155,7 +155,7 @@ public class HTML2TextReader extends SubstitutionTextReader { } private void finishAndReinitializeCurrentStyle(int offset) { - if (offset != fCurrentStyleRange.start && !isDefaultStyleRange(fCurrentStyleRange)) { + if (fTextPresentation != null && offset != fCurrentStyleRange.start && !isDefaultStyleRange(fCurrentStyleRange)) { fCurrentStyleRange.length= offset - fCurrentStyleRange.start; fTextPresentation.addStyleRange(fCurrentStyleRange); } |