Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Fix NPE

Daniel697049203473
diff --git a/kernel/sql/block_query.go b/kernel/sql/block_query.go
index 7ba9287c65..578f4300ab 100644
--- a/kernel/sql/block_query.go
+++ b/kernel/sql/block_query.go
@@ -780,6 +780,9 @@ func GetBlock(id string) (ret *Block) {
return
}
row := queryRow("SELECT * FROM blocks WHERE id = ?", id)
+ if nil == row {
+ return
+ }
ret = scanBlockRow(row)
if nil != ret {
putBlockCache(ret)