aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Runtime.cpp
diff options
context:
space:
mode:
authorDavid Monahan <david.monahan@arm.com>2021-08-11 10:22:35 +0100
committerDavid Monahan <david.monahan@arm.com>2021-08-11 10:22:35 +0100
commit75b981dba849db74b1cb74438348cbcad54bf45d (patch)
treee1e4a319c22d0caea5c7641a126e1eac7a0c7dfd /src/armnn/Runtime.cpp
parente5339e7013cf24e5a34509fb0a60377e5f8a244e (diff)
downloadarmnn-75b981dba849db74b1cb74438348cbcad54bf45d.tar.gz
IVGCVSW-6087 Add an Assertion check to make sure we aren't given null allocators
Add conditional compilation check to Cl specific header Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ib196b8ef4dc5fcfd1d1ccd3f29abf8e0ecd020cb
Diffstat (limited to 'src/armnn/Runtime.cpp')
-rw-r--r--src/armnn/Runtime.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp
index 9fe58287c3..5a52888639 100644
--- a/src/armnn/Runtime.cpp
+++ b/src/armnn/Runtime.cpp
@@ -307,6 +307,8 @@ RuntimeImpl::RuntimeImpl(const IRuntime::CreationOptions& options)
if (customAllocatorMapIterator != options.m_CustomAllocatorMap.end())
{
std::string err;
+ // Check we have actually been given an allocator.
+ ARMNN_ASSERT(customAllocatorMapIterator->second != nullptr);
if (customAllocatorMapIterator->second->GetMemorySourceType()
== armnn::MemorySource::DmaBufProtected)
{