Skip to content

Commit

Permalink
Merge pull request #5 from aloeliger/preventDestructorSegfault
Browse files Browse the repository at this point in the history
Initialize model_lib_ to nullptr for defined destructor behavior
  • Loading branch information
aloeliger authored Mar 12, 2024
2 parents 34f6db2 + a5019ff commit 17790de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hls4ml/emulator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using namespace hls4mlEmulator;

ModelLoader::ModelLoader(std::string model_name)
{
model_lib_ = nullptr; // Set to null for defined destructor behavior in case of failed load
model_name_ = std::move(model_name);
model_name_.append(".so");
}
Expand Down

0 comments on commit 17790de

Please sign in to comment.