diff options
author | Ted Gould <ted@gould.cx> | 2014-02-28 13:57:38 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-02-28 13:57:38 -0600 |
commit | c362b97968c8732773057905193762063880cd8e (patch) | |
tree | dd6342ea5b5bb297fd9d4f9d09459fd931fe9f3a | |
parent | e9216681e8644d91d8efc2aff76810d9172e48a6 (diff) | |
download | ayatana-indicator-sound-c362b97968c8732773057905193762063880cd8e.tar.gz ayatana-indicator-sound-c362b97968c8732773057905193762063880cd8e.tar.bz2 ayatana-indicator-sound-c362b97968c8732773057905193762063880cd8e.zip |
Null user protection
-rw-r--r-- | src/media-player-list-greeter.vala | 8 |
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)); |