aboutsummaryrefslogtreecommitdiff
path: root/src/music-player-bridge.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/music-player-bridge.vala')
-rw-r--r--src/music-player-bridge.vala5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala
index 0c9cb10..e7bc1fb 100644
--- a/src/music-player-bridge.vala
+++ b/src/music-player-bridge.vala
@@ -229,14 +229,13 @@ public class MusicPlayerBridge : GLib.Object
{
var result = desktop_or_interface;
var tokens = desktop_or_interface.split( "." );
- if ( tokens.length > 1 ){
+ if (tokens != null && tokens.length > 1){
result = tokens[tokens.length - 1];
}
var temp = result.split("-");
- if (temp.length > 1){
+ if (temp != null && temp.length > 1){
result = temp[0];
}
- debug("determine key result = %s", result);
return result;
}