diff options
Diffstat (limited to 'src/sound-menu.vala')
-rw-r--r-- | src/sound-menu.vala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala index e1c5c1f..f3f4fd9 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -141,10 +141,16 @@ class SoundMenu: Object void insert_player_section (MediaPlayer player) { var section = new Menu (); + Icon icon; + + icon = player.icon; + if (icon == null) + icon = new ThemedIcon.with_default_fallbacks ("application-default-icon"); var player_item = new MenuItem (player.name, "indicator." + player.id); player_item.set_attribute ("x-canonical-type", "s", "com.canonical.unity.media-player"); - player_item.set_attribute_value ("icon", g_icon_serialize (player.icon)); + if (icon != null) + player_item.set_attribute_value ("icon", g_icon_serialize (icon)); section.append_item (player_item); var playback_item = new MenuItem (null, null); |