[Git][pulseaudio/pavucontrol][master] mainwindow: Correctly remove cards when they go away
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Wed Jul 3 14:22:44 UTC 2024
PulseAudio Marge Bot pushed to branch master at PulseAudio / pavucontrol
Commits:
c70cdeed by Arun Raghavan at 2024-07-03T08:42:36-04:00
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>
- - - - -
1 changed file:
- src/mainwindow.cc
Changes:
=====================================
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();
}
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/commit/c70cdeed74158ac8e196cac9984bfb642ab0f601
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/commit/c70cdeed74158ac8e196cac9984bfb642ab0f601
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20240703/81b6e1c6/attachment.htm>
More information about the pulseaudio-commits
mailing list