From: Inki Dae Date: Tue, 12 May 2020 06:16:20 +0000 (+0900) Subject: handle an error case to GetBackendCapacity correctly X-Git-Tag: submit/tizen/20200602.011936~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F233110%2F1;p=platform%2Fcore%2Fmultimedia%2Finference-engine-interface.git handle an error case to GetBackendCapacity correctly Change-Id: I86f633f9b8b43a375b80e662d081a5537890e796 Signed-off-by: Inki Dae --- diff --git a/src/inference_engine_common_impl.cpp b/src/inference_engine_common_impl.cpp index a5b03a8..d49e074 100755 --- a/src/inference_engine_common_impl.cpp +++ b/src/inference_engine_common_impl.cpp @@ -358,6 +358,11 @@ int InferenceEngineCommon::SetOutputLayerProperty(inference_engine_layer_propert int InferenceEngineCommon::GetBackendCapacity(inference_engine_capacity *capacity) { + if (capacity == nullptr) { + LOGE("Given inference_engine_capacity object is invalid."); + return INFERENCE_ENGINE_ERROR_INVALID_PARAMETER; + } + return mBackendHandle->GetBackendCapacity(capacity); }