Browse Source

:bug: Fix NPE

Daniel 2 years ago
parent
commit
c2a6e6560a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      kernel/model/index_fix.go

+ 3 - 0
kernel/model/index_fix.go

@@ -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
 	}