HaikuDepot: Cause and wait for the package-populator thread to exit on window close.

May help with #17689.
This commit is contained in:
Augustin Cavalier
2022-04-25 18:46:13 -04:00
parent 4e16be4fa0
commit a386685453
+3
View File
@@ -293,6 +293,9 @@ MainWindow::~MainWindow()
fShuttingDownWindow->Quit();
}
delete_sem(fPackageToPopulateSem);
wait_for_thread(fPopulatePackageWorker, NULL);
// We must clear the model early to release references.
fModel.Clear();
}