Skip to content

Commit

Permalink
Check for nullptr when unloading model
Browse files Browse the repository at this point in the history
  • Loading branch information
wphicks committed Apr 28, 2021
1 parent 4196033 commit f5a2b13
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 f5a2b13

Please sign in to comment.