fixing #4703 reveals another bug

This commit is contained in:
Ben Fry
2019-01-20 10:28:14 -08:00
parent b9c6b2f991
commit 0b76e397e9
2 changed files with 3 additions and 1 deletions

View File

@@ -255,6 +255,7 @@ public class JavaBuild {
writer.close();
}
} catch (RuntimeException re) {
re.printStackTrace();
throw new SketchException("Could not write " + java.getAbsolutePath());
}
} catch (antlr.RecognitionException re) {

View File

@@ -1230,7 +1230,8 @@ public class PdePreprocessor {
if ((mode == Mode.STATIC) || (mode == Mode.ACTIVE)) {
// doesn't remove the original size() method,
// but calling size() again in setup() is harmless.
if (!hasMethod("settings") && sizeInfo.hasSettings()) {
if (!hasMethod("settings") &&
sizeInfo != null && sizeInfo.hasSettings()) {
out.println(indent + "public void settings() { " + sizeInfo.getSettings() + " }");
}