Skip to content

Commit b7ee646

Browse files
debermudezlkomali
andauthored
Add a check if ModelParser pointer is nullptr (#652) (#656)
Co-authored-by: Harshini Komali <[email protected]>
1 parent 33328f5 commit b7ee646

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/c++/perf_analyzer/inference_profiler.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,8 @@ InferenceProfiler::DetermineStatsModelVersion(
15451545
// hit. This is due to the scheduler sends cache response and composing models
15461546
// do not get executed. It's a valid scenario and shouldn't throw error.
15471547
bool model_version_unspecified_and_invalid =
1548-
*status_model_version == -1 && !parser_->TopLevelResponseCachingEnabled();
1548+
*status_model_version == -1 &&
1549+
(parser_ == nullptr || !parser_->TopLevelResponseCachingEnabled());
15491550
if (model_version_unspecified_and_invalid) {
15501551
return cb::Error(
15511552
"failed to find the requested model version", pa::GENERIC_ERROR);

0 commit comments

Comments
 (0)