diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-08-27 13:43:32 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-08-27 13:52:19 +0100 |
commit | a6539ed27cd676838827e82100487ee33a8e4fe2 (patch) | |
tree | c18f288f82d5887567041a34401dab3f499122ea /src/armnn | |
parent | cddc906965339ed9dd0fce5b93ab0c7b453ef490 (diff) | |
download | armnn-a6539ed27cd676838827e82100487ee33a8e4fe2.tar.gz |
IVGCVSW-3277 Fix RequiresCopy in case a tensor handle factory is not available
* Added null checks prior of using either the source or the destination
handle factory when checking if the tensor requires to be copied
Change-Id: Icc6737562849be5e7d1a62243327366e06312eb9
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/armnn')
-rw-r--r-- | src/armnn/Network.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp index 932f9eb49e..0ef14075b6 100644 --- a/src/armnn/Network.cpp +++ b/src/armnn/Network.cpp @@ -441,7 +441,8 @@ bool RequiresCopy(ITensorHandleFactory::FactoryId src, ITensorHandleFactory* srcFactory = registry.GetFactory(src); ITensorHandleFactory* dstFactory = registry.GetFactory(dst); - if ((srcFactory->GetExportFlags() & dstFactory->GetImportFlags()) != 0) + if (srcFactory && dstFactory && + (srcFactory->GetExportFlags() & dstFactory->GetImportFlags()) != 0) { return false; } |