package uk.ac.ed.ph.snuggletex;
...
...
-
/**
* Encapsulates an error in the LaTeX input, providing information about what the error is and where
* it occurred.
@@ -73,7 +72,7 @@
+ "(errorCode="
+ errorCode.toString()
+ ",slice="
- + slice.toString()
+ + (slice == null ? "null" : slice.toString())
+ ",arguments="
+ Arrays.toString(arguments)
+ ")";
In this line the
FrozenSlice
object is assigned anull
value:If we want to print the error log the
InputError
may throw an NPE exception.This patch can avoid the NPE: