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,7 +123,8 @@ output_device_changed_cb (CcSoundPanel *self)
|
|||
gtk_widget_set_visible (GTK_WIDGET (self->fade_row), can_fade);
|
||||
gtk_widget_set_visible (GTK_WIDGET (self->subwoofer_row), has_lfe);
|
||||
|
||||
gvc_mixer_control_change_output (self->mixer_control, device);
|
||||
if (device != NULL)
|
||||
gvc_mixer_control_change_output (self->mixer_control, device);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -143,7 +144,8 @@ input_device_changed_cb (CcSoundPanel *self)
|
|||
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);
|
||||
|
||||
gvc_mixer_control_change_input (self->mixer_control, device);
|
||||
if (device != NULL)
|
||||
gvc_mixer_control_change_input (self->mixer_control, device);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue