mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
lib/model: Catch racy nil deref in ClusterConfig (#5106)
This commit is contained in:
parent
7812c2c937
commit
ee42c46bd3
@ -953,12 +953,17 @@ func (m *Model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
||||
if cfg.Paused {
|
||||
continue
|
||||
}
|
||||
fs, ok := m.folderFiles[folder.ID]
|
||||
if !ok {
|
||||
// Shouldn't happen because !cfg.Paused, but might happen
|
||||
// if the folder is about to be unpaused, but not yet.
|
||||
continue
|
||||
}
|
||||
|
||||
if !folder.DisableTempIndexes {
|
||||
tempIndexFolders = append(tempIndexFolders, folder.ID)
|
||||
}
|
||||
|
||||
fs := m.folderFiles[folder.ID]
|
||||
myIndexID := fs.IndexID(protocol.LocalDeviceID)
|
||||
mySequence := fs.Sequence(protocol.LocalDeviceID)
|
||||
var startSequence int64
|
||||
|
Loading…
Reference in New Issue
Block a user