mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Explicitly delete source list items in closeEvent
This should reduce the chances of any deleteLater objects holding strong references into the libobs core getting stuck in the Qt event queue
This commit is contained in:
@@ -2023,11 +2023,13 @@ void OBSBasic::closeEvent(QCloseEvent *event)
|
||||
* any ->deleteLater events in this window created by Qt in relation to
|
||||
* their internal data */
|
||||
ClearVolumeControls();
|
||||
ui->sources->clear();
|
||||
|
||||
QListWidgetItem *item = nullptr;
|
||||
while ((item = ui->scenes->takeItem(0)))
|
||||
delete item;
|
||||
|
||||
while ((item = ui->sources->takeItem(0)))
|
||||
delete item;
|
||||
}
|
||||
|
||||
void OBSBasic::changeEvent(QEvent *event)
|
||||
|
||||
Reference in New Issue
Block a user