aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-02-28 13:57:38 -0600
committerTed Gould <ted@gould.cx>2014-02-28 13:57:38 -0600
commitc362b97968c8732773057905193762063880cd8e (patch)
treedd6342ea5b5bb297fd9d4f9d09459fd931fe9f3a /src
parente9216681e8644d91d8efc2aff76810d9172e48a6 (diff)
downloadayatana-indicator-sound-c362b97968c8732773057905193762063880cd8e.tar.gz
ayatana-indicator-sound-c362b97968c8732773057905193762063880cd8e.tar.bz2
ayatana-indicator-sound-c362b97968c8732773057905193762063880cd8e.zip
Null user protection
Diffstat (limited to 'src')
-rw-r--r--src/media-player-list-greeter.vala8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/media-player-list-greeter.vala b/src/media-player-list-greeter.vala
index 2488c07..2f1962e 100644
--- a/src/media-player-list-greeter.vala
+++ b/src/media-player-list-greeter.vala
@@ -64,7 +64,13 @@ public class MediaPlayerListGreeter : MediaPlayerList {
}
var old_user = selected_user;
- selected_user = active_user;
+
+ /* Protect against a null user */
+ if (active_user != "") {
+ selected_user = active_user;
+ } else {
+ selected_user = null;
+ }
if (selected_user != null && !players.contains(selected_user)) {
players.insert(selected_user, new MediaPlayerUser(selected_user));