diff --git a/src/org/nschmidt/ldparteditor/text/PrimitiveReplacer.java b/src/org/nschmidt/ldparteditor/text/PrimitiveReplacer.java index 769871f06..865d2370a 100644 --- a/src/org/nschmidt/ldparteditor/text/PrimitiveReplacer.java +++ b/src/org/nschmidt/ldparteditor/text/PrimitiveReplacer.java @@ -283,7 +283,7 @@ private static List substitutePrimitivesTori(String name, List l } final int length = toriName.length(); - if (length == 8 && validToriName(toriName)) { + if (length == 8 && validToriName(toriName) && lines != null) { try { double major = 1; double minor = 1;