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
master
Palana 2015-06-28 02:57:30 +02:00
parent e82018579b
commit 523e8b2517
1 changed files with 3 additions and 1 deletions

View File

@ -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)