diff --git a/echosvg-bridge/src/main/java/io/sf/carte/echosvg/bridge/svg12/DefaultXBLManager.java b/echosvg-bridge/src/main/java/io/sf/carte/echosvg/bridge/svg12/DefaultXBLManager.java index 9123338dd..4d1b499db 100644 --- a/echosvg-bridge/src/main/java/io/sf/carte/echosvg/bridge/svg12/DefaultXBLManager.java +++ b/echosvg-bridge/src/main/java/io/sf/carte/echosvg/bridge/svg12/DefaultXBLManager.java @@ -235,10 +235,13 @@ public void stopProcessing() { ImportRecord[] irs = new ImportRecord[nSlots]; imports.values().toArray(irs); for (ImportRecord ir : irs) { - if (ir.importElement.getLocalName().equals(XBL_DEFINITION_TAG)) { - removeDefinitionRef(ir.importElement); - } else { - removeImport(ir.importElement); + Element importElm = ir.importElement; + if (importElm != null) { + if (XBL_DEFINITION_TAG.equals(importElm.getLocalName())) { + removeDefinitionRef(importElm); + } else { + removeImport(importElm); + } } }