aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/TensorAllocator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/TensorAllocator.cpp')
-rw-r--r--src/runtime/TensorAllocator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/TensorAllocator.cpp b/src/runtime/TensorAllocator.cpp
index d9616ca09d..dfe239c586 100644
--- a/src/runtime/TensorAllocator.cpp
+++ b/src/runtime/TensorAllocator.cpp
@@ -164,7 +164,7 @@ Status TensorAllocator::import_memory(void *memory)
void TensorAllocator::set_associated_memory_group(MemoryGroup *associated_memory_group)
{
ARM_COMPUTE_ERROR_ON(associated_memory_group == nullptr);
- ARM_COMPUTE_ERROR_ON(_associated_memory_group != nullptr);
+ ARM_COMPUTE_ERROR_ON(_associated_memory_group != nullptr && _associated_memory_group != associated_memory_group);
ARM_COMPUTE_ERROR_ON(_memory.region() != nullptr && _memory.region()->buffer() != nullptr);
_associated_memory_group = associated_memory_group;