File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 3333 */
3434public 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();
You can’t perform that action at this time.
0 commit comments