File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/main/java/net/raphimc/noteblocktool/frames Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,9 @@ public void windowClosing(WindowEvent e) {
303303 public void windowClosed (WindowEvent e ) {
304304 SongPlayerFrame .this .songPlayer .stop ();
305305 SongPlayerFrame .this .updateTimer .stop ();
306- VisualizerWindow .getInstance ().hide ();
306+ if (VisualizerWindow .hasInstance ()) {
307+ VisualizerWindow .getInstance ().hide ();
308+ }
307309 if (SongPlayerFrame .this .soundSystem != null ) SongPlayerFrame .this .soundSystem .close ();
308310 }
309311 });
Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ public static VisualizerWindow getInstance() {
4747 return INSTANCE ;
4848 }
4949
50+ public static boolean hasInstance () {
51+ return INSTANCE != null ;
52+ }
53+
5054 private VisualizerWindow () {
5155 this .renderThread = new Thread (() -> {
5256 GLFWErrorCallback .createPrint (System .err ).set ();
You can’t perform that action at this time.
0 commit comments