diff options
author | Dmitry Shachnev <mitya57@ubuntu.com> | 2015-01-20 22:03:04 +0000 |
---|---|---|
committer | CI Train Bot <ci-train-bot@canonical.com> | 2015-01-20 22:03:04 +0000 |
commit | c93fdaa8a52ffedc5e568629ece5b47b2adbe8f5 (patch) | |
tree | eb22e3524daa9489b0e158c8b48cac859d3e99ac /src | |
parent | b8619a7d550d64bf82ca00821e7d21d4f4646aab (diff) | |
parent | bc82d53ffb97ed3bed87e65f4dc3dabea99cd9b3 (diff) | |
download | ayatana-indicator-sound-c93fdaa8a52ffedc5e568629ece5b47b2adbe8f5.tar.gz ayatana-indicator-sound-c93fdaa8a52ffedc5e568629ece5b47b2adbe8f5.tar.bz2 ayatana-indicator-sound-c93fdaa8a52ffedc5e568629ece5b47b2adbe8f5.zip |
Fix indicator-sound-service crash when active_port is null. Fixes: #1395455
Approved by: Ted Gould
Diffstat (limited to 'src')
-rw-r--r-- | src/volume-control.vala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala index 6f22dc5..6201935 100644 --- a/src/volume-control.vala +++ b/src/volume-control.vala @@ -185,9 +185,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.name == "output-wired_headset" || + 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") { + i.active_port.name == "analog-output-headphones")) { _active_port_headphone = true; } else { _active_port_headphone = false; |