aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-10-26 17:07:21 -0400
committerConor Curran <conor.curran@canonical.com>2011-10-26 17:07:21 -0400
commitcc88e4292669c88a9600e7b61982cff6e2b6436c (patch)
tree7ebaa4daf5074f4fd65877b39930939c003ed14e
parent10f7c505fc666ec0e95a3d0e0ac0def59a3f6dd9 (diff)
parentc27acea44b7a4e073b74e7da1c072029e245ea3e (diff)
downloadayatana-indicator-sound-cc88e4292669c88a9600e7b61982cff6e2b6436c.tar.gz
ayatana-indicator-sound-cc88e4292669c88a9600e7b61982cff6e2b6436c.tar.bz2
ayatana-indicator-sound-cc88e4292669c88a9600e7b61982cff6e2b6436c.zip
protect against odd mpris keys
-rw-r--r--.bzrignore6
-rw-r--r--src/music-player-bridge.vala5
2 files changed, 8 insertions, 3 deletions
diff --git a/.bzrignore b/.bzrignore
index 6b177b5..e47e05c 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -82,3 +82,9 @@ data/com.canonical.indicators.sound.gschema.valid
tests/libmockpulse.la
tests/libmockpulse_la-mockpulse.lo
src/libsoundmenu_la-gen-sound-service.xml.lo
+src/libsoundmenu_la-mute-widget.lo
+src/libsoundmenu_la-sound-state-manager.lo
+src/libsoundmenu_la-sound-state.lo
+src/libsoundmenu_la-voip-input-widget.lo
+src/specific-items-manager.c
+src/stamp-marshal
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;
}