Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornsandonato2010-04-21 15:11:40 +0000
committernsandonato2010-04-21 15:11:40 +0000
commitf2915d4f4a3d6cd71d9c43ac62c079c1a0100ebc (patch)
tree856affd174bc537d09d57eb791c62dfe1dab157e /bundles/org.eclipse.wst.xml.ui
parent0edd68dccde18c87bb914f8bf92e639a9aca2191 (diff)
downloadwebtools.sourceediting-f2915d4f4a3d6cd71d9c43ac62c079c1a0100ebc.tar.gz
webtools.sourceediting-f2915d4f4a3d6cd71d9c43ac62c079c1a0100ebc.tar.xz
webtools.sourceediting-f2915d4f4a3d6cd71d9c43ac62c079c1a0100ebc.zip
[309980] NPE when typing at the end of a document
Diffstat (limited to 'bundles/org.eclipse.wst.xml.ui')
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/CharacterPairInserter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/CharacterPairInserter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/CharacterPairInserter.java
index fd4b5bcd95..2f61324afe 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/CharacterPairInserter.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/CharacterPairInserter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 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
@@ -54,7 +54,7 @@ public class CharacterPairInserter extends AbstractCharacterPairInserter impleme
IStructuredDocumentRegion[] regions = ((IStructuredDocument) doc).getStructuredDocumentRegions(offset, 0);
if (regions != null && regions.length > 0) {
ITextRegion region = regions[0].getRegionAtCharacterOffset(offset);
- return region.getType() != DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE;
+ return region != null && region.getType() != DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE;
}
}
return true;

Back to the top