Ignore:
Timestamp:
2017-08-03T23:51:18+02:00 (2 years ago)
Author:
Don-vip
Message:

fix #15110 - Disable audio actions when no audio is present (patch by bafonins, modified)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/audio/AudioPlayer.java

    r12328 r12565  
    168168    public static boolean paused() {
    169169        AudioPlayer instance = AudioPlayer.getInstance();
    170         return instance == null ? false : (instance.state == State.PAUSED);
     170        return instance != null && instance.state == State.PAUSED;
    171171    }
    172172
     
    177177    public static boolean playing() {
    178178        AudioPlayer instance = AudioPlayer.getInstance();
    179         return instance == null ? false : (instance.state == State.PLAYING);
     179        return instance != null && instance.state == State.PLAYING;
    180180    }
    181181
Note: See TracChangeset for help on using the changeset viewer.