Skip to content

Commit 76010dd

Browse files
committed
volume: Don't use object after unref
This was causing wf-panel to crash i.e. when hotplugging outputs.
1 parent 0ae02ab commit 76010dd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/panel/widgets/volume.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,11 @@ WayfireVolume::~WayfireVolume()
290290
{
291291
disconnect_gvc_stream_signals();
292292

293-
gvc_mixer_control_close(gvc_control);
294-
g_object_unref(gvc_control);
295293
if (notify_default_sink_changed)
296294
g_signal_handler_disconnect(gvc_control, notify_default_sink_changed);
297295

296+
gvc_mixer_control_close(gvc_control);
297+
g_object_unref(gvc_control);
298+
298299
popover_timeout.disconnect();
299300
}

0 commit comments

Comments
 (0)