From 2b6429fb1b0af4feddcc95f7925ecdab4aa56922 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Wed, 20 Sep 2023 22:51:25 +0000 Subject: [PATCH] fix bug --- onnxruntime/core/session/provider_bridge_ort.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/session/provider_bridge_ort.cc b/onnxruntime/core/session/provider_bridge_ort.cc index 5fa15a03cd5b2..950275c7c5a3f 100644 --- a/onnxruntime/core/session/provider_bridge_ort.cc +++ b/onnxruntime/core/session/provider_bridge_ort.cc @@ -1787,7 +1787,7 @@ ORT_API_STATUS_IMPL(OrtApis::SessionOptionsAppendExecutionProvider_TensorRT_V2, options->provider_factories.push_back(factory); std::vector custom_op_domains; - std::string extra_plugin_lib_paths = (tensorrt_options == nullptr) ? "" : tensorrt_options->trt_extra_plugin_lib_paths; + std::string extra_plugin_lib_paths = (tensorrt_options == nullptr || tensorrt_options->trt_extra_plugin_lib_paths == nullptr) ? "" : tensorrt_options->trt_extra_plugin_lib_paths; onnxruntime::ProviderInfo_TensorRT& provider_info = onnxruntime::GetProviderInfo_TensorRT(); provider_info.GetTensorRTCustomOpDomainList(custom_op_domains, extra_plugin_lib_paths); for (auto ptr : custom_op_domains) {