07b5ce0a12f8fadba9bb7941b0874db5493ef034.patch 956 B

1234567891011121314151617181920212223242526
  1. From 07b5ce0a12f8fadba9bb7941b0874db5493ef034 Mon Sep 17 00:00:00 2001
  2. From: Ikey Doherty <ikey@solus-project.com>
  3. Date: Fri, 26 May 2017 09:30:59 +0100
  4. Subject: [PATCH] raven: Only deal with a device card when it actually exists
  5. Signed-off-by: Ikey Doherty <ikey@solus-project.com>
  6. ---
  7. src/raven/sound.vala | 4 ++++
  8. 1 file changed, 4 insertions(+)
  9. diff --git a/src/raven/sound.vala b/src/raven/sound.vala
  10. index becd7128..9c74203b 100644
  11. --- a/src/raven/sound.vala
  12. +++ b/src/raven/sound.vala
  13. @@ -318,6 +318,10 @@ public class SoundWidget : Gtk.Box
  14. }
  15. var device = this.mixer.lookup_output_id(id);
  16. + if (device.card == null) {
  17. + return;
  18. + }
  19. +
  20. var card = device.card as Gvc.MixerCard;
  21. var check = new Gtk.RadioButton.with_label_from_widget(this.output_leader, "%s - %s".printf(device.description, card.name));
  22. (check.get_child() as Gtk.Label).set_ellipsize(Pango.EllipsizeMode.END);