Skip to content

Commit

Permalink
Prevent NullPointerException.
Browse files Browse the repository at this point in the history
  • Loading branch information
nightm4re94 committed Jun 25, 2021
1 parent 799112f commit 847c523
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/de/gurkenlabs/litiengine/entities/SoundSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ public void setRange(int range) {
* @see Sounds#get(String)
*/
public void setSound(String name) {
if (name == null) {
return;
}
this.sound = Resources.sounds().get(name);
}

Expand Down

0 comments on commit 847c523

Please sign in to comment.