aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-02-28 13:57:53 -0600
committerTed Gould <ted@gould.cx>2014-02-28 13:57:53 -0600
commitdf36f41ca206687a0c49584f70011db7e94075b7 (patch)
tree59d6f10b0ee9e36ffdc2e810002edde40364feaa /src
parentcb111a1f8489c1d2cec3069988c5e499030f8b50 (diff)
parentc362b97968c8732773057905193762063880cd8e (diff)
downloadayatana-indicator-sound-df36f41ca206687a0c49584f70011db7e94075b7.tar.gz
ayatana-indicator-sound-df36f41ca206687a0c49584f70011db7e94075b7.tar.bz2
ayatana-indicator-sound-df36f41ca206687a0c49584f70011db7e94075b7.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));