src/mainwindow.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 3 14:22:45 UTC 2024
src/mainwindow.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit c70cdeed74158ac8e196cac9984bfb642ab0f601
Author: Arun Raghavan <arun at 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();
}
More information about the pulseaudio-commits
mailing list