summaryrefslogtreecommitdiffstats
path: root/xml/src
diff options
context:
space:
mode:
Diffstat (limited to 'xml/src')
-rw-r--r--xml/src/main/java/org/kxml2/io/KXmlSerializer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/xml/src/main/java/org/kxml2/io/KXmlSerializer.java b/xml/src/main/java/org/kxml2/io/KXmlSerializer.java
index c467e40..68259e0 100644
--- a/xml/src/main/java/org/kxml2/io/KXmlSerializer.java
+++ b/xml/src/main/java/org/kxml2/io/KXmlSerializer.java
@@ -397,7 +397,7 @@ public class KXmlSerializer implements XmlSerializer {
? ""
: getPrefix(namespace, true, true);
- if (namespace.isEmpty()) {
+ if (namespace != null && namespace.isEmpty()) {
for (int i = nspCounts[depth];
i < nspCounts[depth + 1];
i++) {