mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[RDCT] Fix potential race condition in RecentProjectsManagerBase
GitOrigin-RevId: 4597f249d5d6d3b1e1d6dbf86fcc04987811329e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6efe6c9980
commit
16130c061b
@@ -603,10 +603,11 @@ open class RecentProjectsManagerBase(coroutineScope: CoroutineScope) :
|
||||
*/
|
||||
fun setProjectHidden(project: Project, hidden: Boolean) {
|
||||
val path = getProjectPath(project) ?: return
|
||||
val info = state.additionalInfo.get(path) ?: return
|
||||
val oldHidden = info.hidden
|
||||
info.hidden = hidden
|
||||
if (oldHidden != hidden) {
|
||||
synchronized(stateLock) {
|
||||
val info = state.additionalInfo.get(path) ?: return
|
||||
if (info.hidden == hidden) return
|
||||
|
||||
info.hidden = hidden
|
||||
modCounter.increment()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user