diff --git a/kernel/util/ocr.go b/kernel/util/ocr.go index b9598a7bc..8d280cc4e 100644 --- a/kernel/util/ocr.go +++ b/kernel/util/ocr.go @@ -132,10 +132,12 @@ func SaveAssetsTexts() { } func SetAssetText(asset, text string) { + var oldText string assetsTextsLock.Lock() + oldText = assetsTexts[asset] assetsTexts[asset] = text assetsTextsLock.Unlock() - if "" != text { + if oldText != text { assetsTextsChanged.Store(true) } }