HaikuDepot: Filtering Crash Resolution

I am unable to reproduce the problem locally, but
suspect that the lack of locking around one line
may be the cause.  Hopefully fixes #14025.

Change-Id: I14ba6d2cb4f264af732fad9c783c55f690cece4f
Reviewed-on: https://review.haiku-os.org/c/1472
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Andrew Lindesay
2019-05-22 19:12:02 +00:00
committed by waddlesplash
parent a70eb9a982
commit cd00276153
+1 -2
View File
@@ -817,10 +817,9 @@ MainWindow::_InitWorkerThreads()
void
MainWindow::_AdoptModel()
{
fVisiblePackages = fModel.CreatePackageList();
{
AutoLocker<BLocker> modelLocker(fModel.Lock());
fVisiblePackages = fModel.CreatePackageList();
AutoLocker<BLocker> listLocker(fPackagesToShowListLock);
fPackagesToShowList = fVisiblePackages;
atomic_add(&fPackagesToShowListID, 1);