Skip to content

Commit 890b951

Browse files
committedFeb 25, 2021
Apparently namespaceContext is nullable. In that case pretend there is an
empty namespace context.
1 parent 93d3f77 commit 890b951

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎core/src/jvmMain/kotlin/nl/adaptivity/xmlutil/StAXWriter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class StAXWriter(
113113
try {
114114
if (namespace.isNullOrEmpty() &&
115115
prefix.isNullOrEmpty() &&
116-
delegate.namespaceContext.getNamespaceURI("").isNullOrEmpty()
116+
delegate.namespaceContext?.getNamespaceURI("").isNullOrEmpty()
117117
) {
118118
if (isEmpty) {
119119
delegate.writeEmptyElement(localName)

0 commit comments

Comments
 (0)