diff options
author | Geir Storli <geirst@verizonmedia.com> | 2019-02-01 14:47:38 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2019-02-01 14:47:38 +0000 |
commit | 28190fa018f26cace2b4572c4698d55de81d52f1 (patch) | |
tree | 950cac109819530254b7512265ea6f4d18bdca84 /searchcore | |
parent | 12cf8c1a86fe0d796de358d63691ce211edf25ce (diff) |
Only apply modify update if current tensor is set.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp b/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp index 060f991d9ac..3ad838c595b 100644 --- a/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp +++ b/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp @@ -209,9 +209,11 @@ void applyTensorModifyUpdate(TensorAttribute &vec, uint32_t lid, const TensorModifyUpdate &update) { auto oldTensor = vec.getTensor(lid); - auto newTensor = update.applyTo(*oldTensor); - if (newTensor) { - vec.setTensor(lid, *newTensor); + if (oldTensor) { + auto newTensor = update.applyTo(*oldTensor); + if (newTensor) { + vec.setTensor(lid, *newTensor); + } } } |