Skip to content

Commit

Permalink
Check for nullptr when unloading model
Browse files Browse the repository at this point in the history
Merge pull request #29 from wphicks/bug-failed_load
  • Loading branch information
wphicks authored Apr 30, 2021
2 parents 375e983 + f5a2b13 commit 5561023
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api.cu
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ TRITONBACKEND_ModelFinalize(TRITONBACKEND_Model* model)
{
try {
auto model_state = get_model_state<ModelState>(*model);
model_state->UnloadModel();
if (model_state != nullptr) {
model_state->UnloadModel();
}

LOG_MESSAGE(
TRITONSERVER_LOG_INFO, "TRITONBACKEND_ModelFinalize: delete model state");
Expand Down

0 comments on commit 5561023

Please sign in to comment.