Browse Source

checks key for null in getData method of MPRISource

fixes issue 4155

Change-Id: I26fcb0b617339e3db81bef0836436c4920d57f4f
Reviewed-on: http://gerrit.dmdirc.com/1263
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
tags/0.6.4
Simon Mott 14 years ago
parent
commit
2c407c04da
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/com/dmdirc/addons/mediasource_dbus/MPRISSource.java

+ 2
- 1
src/com/dmdirc/addons/mediasource_dbus/MPRISSource.java View File

@@ -101,7 +101,8 @@ public class MPRISSource implements MediaSource {
101 101
      * @return The value of the specified key or "Unknown".
102 102
      */
103 103
     protected String getData(final String key) {
104
-        return data == null || !data.containsKey(key) ? "Unknown" : data.get(key);
104
+        return data == null || !data.containsKey(key) || data.get(key) == null
105
+                ? "Unknown" : data.get(key);
105 106
     }
106 107
 
107 108
     /** {@inheritDoc} */

Loading…
Cancel
Save