File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -503,15 +503,15 @@ public void PlayPauseHandle(ActionEvent event) {
503
503
System .out .println (playing + " " + paused );
504
504
505
505
try {
506
- if (playing && st .getStatus () == Animation .Status .RUNNING ) {
506
+ if (playing && st != null && st .getStatus () == Animation .Status .RUNNING ) {
507
507
Image image = new Image (getClass ().getResourceAsStream ("/play_arrow_black_48x48.png" ));
508
508
playPauseImage .setImage (image );
509
509
System .out .println ("Pausing" );
510
510
st .pause ();
511
511
paused = true ;
512
512
playing = false ;
513
513
return ;
514
- } else if (paused ) {
514
+ } else if (paused && st != null ) {
515
515
Image image = new Image (getClass ().getResourceAsStream ("/pause_black_48x48.png" ));
516
516
playPauseImage .setImage (image );
517
517
if (st .getStatus () == Animation .Status .PAUSED )
You can’t perform that action at this time.
0 commit comments