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:
Palana
2015-06-28 04:04:15 +02:00
parent e82018579b
commit 523e8b2517
+3 -1
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)