From c8d6e94441f25ed663d6db473f886c1c99aa35bc Mon Sep 17 00:00:00 2001 From: zhoufeng Date: Wed, 14 Oct 2020 18:38:08 +0800 Subject: [PATCH] handle empty label resource Signed-off-by: zhoufeng --- ge/ge_runtime/runtime_model.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ge/ge_runtime/runtime_model.cc b/ge/ge_runtime/runtime_model.cc index 0b76cbaf..9fc708c7 100644 --- a/ge/ge_runtime/runtime_model.cc +++ b/ge/ge_runtime/runtime_model.cc @@ -330,6 +330,9 @@ void RuntimeModel::RtStreamDestory() noexcept { void RuntimeModel::RtLabelDestory() noexcept { for (size_t i = 0; i < label_list_.size(); i++) { + if (label_list_[i] == nullptr) { + continue; + } if (rtLabelDestroy(label_list_[i]) != RT_ERROR_NONE) { GELOGE(RT_FAILED, "Destroy label failed! Index: %zu.", i); return;