Skip to content

Commit e4f55df

Browse files
committed
trying to track down processing#3265
1 parent 51f226a commit e4f55df

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

app/src/processing/app/Editor.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2854,6 +2854,10 @@ public void statusError(Exception e) {
28542854
* Show a notice message in the editor status bar.
28552855
*/
28562856
public void statusNotice(String msg) {
2857+
if (msg == null) {
2858+
new Exception("This code called statusNotice(null)").printStackTrace();
2859+
msg = "";
2860+
}
28572861
status.notice(msg);
28582862
}
28592863

@@ -2868,15 +2872,15 @@ public void clearNotice(String msg) {
28682872
/**
28692873
* Returns the current notice message in the editor status bar.
28702874
*/
2871-
public String getStatusMessage(){
2875+
public String getStatusMessage() {
28722876
return status.message;
28732877
}
28742878

28752879

28762880
/**
28772881
* Returns the current mode of the editor status bar: NOTICE, ERR or EDIT.
28782882
*/
2879-
public int getStatusMode(){
2883+
public int getStatusMode() {
28802884
return status.mode;
28812885
}
28822886

app/src/processing/app/EditorStatus.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
public class EditorStatus extends JPanel {
3535
static final int HIGH = 28;
36-
36+
3737
Color[] bgcolor;
3838
Color[] fgcolor;
3939

@@ -205,8 +205,11 @@ public void paintComponent(Graphics screen) {
205205
g.fillRect(0, 0, sizeW, sizeH);
206206

207207
g.setColor(fgcolor[mode]);
208-
g.setFont(font); // needs to be set each time on osx
209-
g.drawString(message, Preferences.GUI_SMALL, (sizeH + ascent) / 2);
208+
// https://github.com/processing/processing/issues/3265
209+
if (message != null) {
210+
g.setFont(font); // needs to be set each time on osx
211+
g.drawString(message, Preferences.GUI_SMALL, (sizeH + ascent) / 2);
212+
}
210213

211214
if (indeterminate) {
212215
//int x = cancelButton.getX();

0 commit comments

Comments
 (0)