[gnome-flashback] system-indicators: avoid critical warning
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] system-indicators: avoid critical warning
- Date: Fri, 27 Dec 2019 19:45:05 +0000 (UTC)
commit 059c7214b0a621f13e6659cf18988c04604d8919
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Dec 27 21:40:16 2019 +0200
system-indicators: avoid critical warning
system-indicators/si-volume.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/system-indicators/si-volume.c b/system-indicators/si-volume.c
index a6cc6d0..27a1b9c 100644
--- a/system-indicators/si-volume.c
+++ b/system-indicators/si-volume.c
@@ -644,6 +644,9 @@ get_has_headphones (SiVolume *self)
g_strcmp0 (form_factor, "headphone") == 0)
return TRUE;
+ if (gvc_mixer_stream_get_ports (self->stream) == NULL)
+ return FALSE;
+
port = gvc_mixer_stream_get_port (self->stream);
if (port != NULL && g_strstr_len (port->port, -1, "headphone") != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]