volume: Suppress a critical warning
gvc_mixer_stream_get_port() emits a warning in the no-ports case, which we can avoid by rearranging the check for that case. https://bugzilla.gnome.org/show_bug.cgi?id=693049
This commit is contained in:
parent
9bcce4f271
commit
d07c8dcd9c
@ -169,9 +169,8 @@ const OutputStreamSlider = new Lang.Class({
|
||||
// a bit hackish, but ALSA/PulseAudio have a number
|
||||
// of different identifiers for headphones, and I could
|
||||
// not find the complete list
|
||||
let port = sink.get_port();
|
||||
if (port)
|
||||
return port.port.indexOf('headphone') >= 0;
|
||||
if (sink.get_ports().length > 0)
|
||||
return sink.get_port().port.indexOf('headphone') >= 0;
|
||||
|
||||
return false;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user