Skip to content

Commit d73fd85

Browse files
committed
be a little nicer if there is no ErrorTable defined
1 parent bfe0c87 commit d73fd85

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

app/src/processing/app/ui/Editor.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,7 +2810,9 @@ public void errorTableDoubleClick(Object item) { }
28102810
* the error button at the bottom of the PDE
28112811
*/
28122812
public void updateErrorToggle(boolean hasErrors) {
2813-
footer.setNotification(errorTable.getParent(), hasErrors);
2813+
if (errorTable != null) {
2814+
footer.setNotification(errorTable.getParent(), hasErrors);
2815+
}
28142816
}
28152817

28162818

@@ -2991,14 +2993,16 @@ public void setProblemList(List<Problem> problems) {
29912993
* Updates the error table in the Error Window.
29922994
*/
29932995
public void updateErrorTable(List<Problem> problems) {
2994-
errorTable.clearRows();
2995-
2996-
for (Problem p : problems) {
2997-
String message = p.getMessage();
2998-
errorTable.addRow(p, message,
2999-
sketch.getCode(p.getTabIndex()).getPrettyName(),
3000-
Integer.toString(p.getLineNumber() + 1));
3001-
// Added +1 because lineNumbers internally are 0-indexed
2996+
if (errorTable != null) {
2997+
errorTable.clearRows();
2998+
2999+
for (Problem p : problems) {
3000+
String message = p.getMessage();
3001+
errorTable.addRow(p, message,
3002+
sketch.getCode(p.getTabIndex()).getPrettyName(),
3003+
Integer.toString(p.getLineNumber() + 1));
3004+
// Added +1 because lineNumbers internally are 0-indexed
3005+
}
30023006
}
30033007
}
30043008

0 commit comments

Comments
 (0)