aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/media-player-list-greeter.vala9
-rw-r--r--src/media-player-user.vala21
2 files changed, 25 insertions, 5 deletions
diff --git a/src/media-player-list-greeter.vala b/src/media-player-list-greeter.vala
index fb57597..1357e38 100644
--- a/src/media-player-list-greeter.vala
+++ b/src/media-player-list-greeter.vala
@@ -45,8 +45,13 @@ public class MediaPlayerListGreeter : MediaPlayerList {
this.proxy.entry_selected.connect(active_user_changed);
this.proxy.get_active_entry.begin ((obj, res) => {
try {
- var value = (obj as AyatanaGreeterList).get_active_entry.end(res);
- active_user_changed(value);
+ var list = (obj as AyatanaGreeterList);
+
+ if (list != null)
+ {
+ var value = list.get_active_entry.end(res);
+ active_user_changed(value);
+ }
} catch (Error e) {
warning("Unable to get active entry: %s", e.message);
}
diff --git a/src/media-player-user.vala b/src/media-player-user.vala
index 3cc90a0..ee31537 100644
--- a/src/media-player-user.vala
+++ b/src/media-player-user.vala
@@ -238,7 +238,12 @@ public class MediaPlayerUser : MediaPlayer {
if (this.greeter != null) {
this.greeter.RequestSoundPlayPause.begin(this.username, (obj, res) => {
try {
- (obj as GreeterBroadcast).RequestSoundPlayPause.end(res);
+ var broadcasts = (obj as GreeterBroadcast);
+
+ if (broadcasts != null)
+ {
+ broadcasts.RequestSoundPlayPause.end(res);
+ }
} catch (Error e) {
warning("Unable to send play pause: %s", e.message);
}
@@ -253,7 +258,12 @@ public class MediaPlayerUser : MediaPlayer {
if (this.greeter != null) {
this.greeter.RequestSoundNext.begin(this.username, (obj, res) => {
try {
- (obj as GreeterBroadcast).RequestSoundNext.end(res);
+ var broadcasts = (obj as GreeterBroadcast);
+
+ if (broadcasts != null)
+ {
+ broadcasts.RequestSoundNext.end(res);
+ }
} catch (Error e) {
warning("Unable to send next: %s", e.message);
}
@@ -268,7 +278,12 @@ public class MediaPlayerUser : MediaPlayer {
if (this.greeter != null) {
this.greeter.RequestSoundPrev.begin(this.username, (obj, res) => {
try {
- (obj as GreeterBroadcast).RequestSoundPrev.end(res);
+ var broadcasts = (obj as GreeterBroadcast);
+
+ if (broadcasts != null)
+ {
+ broadcasts.RequestSoundPrev.end(res);
+ }
} catch (Error e) {
warning("Unable to send previous: %s", e.message);
}