From 483c490ec4db2d2b5001e42f5c842abfc9e379af Mon Sep 17 00:00:00 2001 From: Edward Chen <18449977+edgchen1@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:38:44 -0800 Subject: [PATCH] Refine error checks in onnxruntime/core/providers/coreml/model/model.mm. (#18620) #18606 updated the original error checks to check that the returned object != nil to appease the static analyzer. However, per the API docs, checking `error != nil` is the way to determine whether an error occurred. This change adds back the `error != nil` check to be safe. --- onnxruntime/core/providers/coreml/model/model.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/onnxruntime/core/providers/coreml/model/model.mm b/onnxruntime/core/providers/coreml/model/model.mm index 32821fd02647a..155201ad4c39c 100644 --- a/onnxruntime/core/providers/coreml/model/model.mm +++ b/onnxruntime/core/providers/coreml/model/model.mm @@ -159,7 +159,7 @@ Status CreateInputFeatureProvider(const std::unordered_map