sound: Fix crash when sound device set to NULL
This can occur during transitions.
Introduced in f081264
.
This commit is contained in:
parent
f0812644ae
commit
82ca937ecd
1 changed files with 4 additions and 2 deletions
|
@ -123,6 +123,7 @@ output_device_changed_cb (CcSoundPanel *self)
|
||||||
gtk_widget_set_visible (GTK_WIDGET (self->fade_row), can_fade);
|
gtk_widget_set_visible (GTK_WIDGET (self->fade_row), can_fade);
|
||||||
gtk_widget_set_visible (GTK_WIDGET (self->subwoofer_row), has_lfe);
|
gtk_widget_set_visible (GTK_WIDGET (self->subwoofer_row), has_lfe);
|
||||||
|
|
||||||
|
if (device != NULL)
|
||||||
gvc_mixer_control_change_output (self->mixer_control, device);
|
gvc_mixer_control_change_output (self->mixer_control, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +144,7 @@ input_device_changed_cb (CcSoundPanel *self)
|
||||||
cc_volume_slider_set_stream (self->input_volume_slider, stream);
|
cc_volume_slider_set_stream (self->input_volume_slider, stream);
|
||||||
cc_level_bar_set_stream (self->input_level_bar, stream, CC_LEVEL_BAR_STREAM_TYPE_INPUT);
|
cc_level_bar_set_stream (self->input_level_bar, stream, CC_LEVEL_BAR_STREAM_TYPE_INPUT);
|
||||||
|
|
||||||
|
if (device != NULL)
|
||||||
gvc_mixer_control_change_input (self->mixer_control, device);
|
gvc_mixer_control_change_input (self->mixer_control, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue