aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-01-29 17:31:55 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-01-29 17:31:55 +0000
commit31352c73d5d44b3f82af583d7d17790a63daf0a7 (patch)
treeb02e509a920e938ac6bbb76a9badabc1eb35c0f5 /src
parent2f4b640373546b86b5f0d3be12b72b3d6cdace98 (diff)
parent7774969eac0d06926060e39368c4f5906446421d (diff)
downloadayatana-indicator-sound-31352c73d5d44b3f82af583d7d17790a63daf0a7.tar.gz
ayatana-indicator-sound-31352c73d5d44b3f82af583d7d17790a63daf0a7.tar.bz2
ayatana-indicator-sound-31352c73d5d44b3f82af583d7d17790a63daf0a7.zip
Ensure that the active port is not null before looking at its value Fixes: #1399862
Approved by: Antti Kaijanmäki, PS Jenkins bot
Diffstat (limited to 'src')
-rw-r--r--src/volume-control.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index c5e1883..bf97021 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -179,10 +179,10 @@ public class VolumeControl : Object
* checking for the port name. On touch (with the pulseaudio droid element)
* the headset/headphone port is called 'output-headset' and 'output-headphone'.
* On the desktop this is usually called 'analog-output-headphones' */
- if (i.active_port != null && (
- i.active_port.name == "output-wired_headset" ||
- i.active_port.name == "output-wired_headphone" ||
- i.active_port.name == "analog-output-headphones")) {
+ if (i.active_port != null &&
+ (i.active_port.name == "output-wired_headset" ||
+ i.active_port.name == "output-wired_headphone" ||
+ i.active_port.name == "analog-output-headphones")) {
_active_port_headphone = true;
} else {
_active_port_headphone = false;