UI: Fix crash when closing missing files window

A crash would occur when clicking the 'x' button in the missing files
dialog. This seemed to only happen in debug mode and using QT 5.15.0.

Closes obsproject/obs-studio#4363
Fixes obsproject/obs-studio#4359
This commit is contained in:
Clayton Groeneveld
2021-04-17 00:28:15 -05:00
committed by Jim
parent 2aed4be7cf
commit 44ee91188f
2 changed files with 2 additions and 6 deletions

View File

@@ -1165,12 +1165,9 @@ retryScene:
if (obs_missing_files_count(files) > 0) {
missDialog = new OBSMissingFiles(files, this);
missDialog->setAttribute(Qt::WA_DeleteOnClose, true);
missDialog->show();
missDialog->raise();
auto close = [=]() { delete missDialog; };
connect(missDialog, &OBSMissingFiles::finished, close);
} else {
obs_missing_files_destroy(files);
}