src/mainwindow.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit c70cdeed74158ac8e196cac9984bfb642ab0f601 Author: Arun Raghavan <a...@asymptotic.io> Date: Wed Jul 3 08:40:40 2024 -0400 mainwindow: Correctly remove cards when they go away The reference is owned by the VBox, so we remove it there and it gets cleaned up, like other widgets. Fixes: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/issues/162 Part-of: <https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/merge_requests/98> diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 0ce7640..f834e18 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -1272,7 +1272,7 @@ void MainWindow::removeCard(uint32_t index) { if (!cardWidgets.count(index)) return; - delete cardWidgets[index]; + cardsVBox->remove(*cardWidgets[index]); cardWidgets.erase(index); updateDeviceVisibility(); }