Browse Source

:art: Improve kernel stability https://github.com/siyuan-note/siyuan/issues/9912

Daniel 1 year ago
parent
commit
171b915134
1 changed files with 4 additions and 0 deletions
  1. 4 0
      kernel/model/tag.go

+ 4 - 0
kernel/model/tag.go

@@ -285,6 +285,10 @@ func labelBlocksByKeyword(keyword string) (ret map[string]TagBlocks) {
 	sqlBlocks := sql.GetBlocks(blockIDs)
 	blockMap := map[string]*sql.Block{}
 	for _, block := range sqlBlocks {
+		if nil == block {
+			continue
+		}
+
 		blockMap[block.ID] = block
 	}