File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
jme3-core/src/main/java/com/jme3/audio/openal Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1447,6 +1447,12 @@ public void pauseSource(AudioSource src) {
14471447 return ;
14481448 }
14491449
1450+ AudioData audioData = src .getAudioData ();
1451+ if (audioData == null ) {
1452+ logger .log (Level .WARNING , "pauseSource called on source with null AudioData: {0}" , src );
1453+ return ;
1454+ }
1455+
14501456 if (src .getStatus () == Status .Playing ) {
14511457 assert src .getChannel () != -1 ;
14521458
@@ -1471,6 +1477,12 @@ public void stopSource(AudioSource src) {
14711477 return ;
14721478 }
14731479
1480+ AudioData audioData = src .getAudioData ();
1481+ if (audioData == null ) {
1482+ logger .log (Level .WARNING , "stopSource called on source with null AudioData: {0}" , src );
1483+ return ;
1484+ }
1485+
14741486 if (src .getStatus () != Status .Stopped ) {
14751487 int channel = src .getChannel ();
14761488 assert channel != -1 ; // if it's not stopped, must have id
You can’t perform that action at this time.
0 commit comments