🐛 Fix NPE

This commit is contained in:
Daniel 2023-07-21 18:38:12 +08:00
parent fa679fcdbb
commit c2a6e6560a
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017

View File

@ -78,6 +78,9 @@ func removeDuplicateDatabaseIndex() {
roots := sql.GetBlocks(duplicatedRootIDs)
rootMap := map[string]*sql.Block{}
for _, root := range roots {
if nil == root {
continue
}
rootMap[root.ID] = root
}