aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-04-14 10:15:06 -0500
committerTed Gould <ted@gould.cx>2014-04-14 10:15:06 -0500
commitc61f3dc9e934b75b234c49e5ac892bcda2ffac75 (patch)
tree117cc06dbd21dbf3cacb3ea98d9edf22399426f9 /src
parentb95433aeb8e8f2805c17791564c23b42aa2411e9 (diff)
downloadayatana-indicator-sound-c61f3dc9e934b75b234c49e5ac892bcda2ffac75.tar.gz
ayatana-indicator-sound-c61f3dc9e934b75b234c49e5ac892bcda2ffac75.tar.bz2
ayatana-indicator-sound-c61f3dc9e934b75b234c49e5ac892bcda2ffac75.zip
Protect against icon serialization errors
Diffstat (limited to 'src')
-rw-r--r--src/accounts-service-user.vala9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/accounts-service-user.vala b/src/accounts-service-user.vala
index 4dd7e6f..194beb0 100644
--- a/src/accounts-service-user.vala
+++ b/src/accounts-service-user.vala
@@ -62,7 +62,14 @@ public class AccountsServiceUser : Object {
var icon = new ThemedIcon.with_default_fallbacks ("application-default-icon");
this.proxy.player_icon = icon.serialize();
} else {
- this.proxy.player_icon = this._player.icon.serialize();
+ var serialization = this._player.icon.serialize();
+
+ if (serialization == null) {
+ var icon = new ThemedIcon.with_default_fallbacks ("application-default-icon");
+ serialization = icon.serialize();
+ }
+
+ this.proxy.player_icon = serialization;
}
this.proxy.running = this._player.is_running;