aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));