diff --git a/scope4m/src/main/jastadd/ASTPrinting.jadd b/scope4m/src/main/jastadd/ASTPrinting.jadd index ce00afc472c04e5d644365b5a8067b98f1ea4b01..67099c05f106ca337aacadd3abfa5162dec4ad16 100644 --- a/scope4m/src/main/jastadd/ASTPrinting.jadd +++ b/scope4m/src/main/jastadd/ASTPrinting.jadd @@ -14,7 +14,8 @@ aspect Debugging { } else { name += ":= "; } - result += "|--" + name + method.invoke(this).toString().split("\\r?\\n")[0]; + Object value = method.invoke(this); + result += "|--" + name + (value == null ? "<null>" : value.toString().split("\\r?\\n")[0]); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (java.lang.reflect.InvocationTargetException e) {