Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't call FreeInstance() if component == NULL #626

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fmusim/FMI1CSSimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ FMIStatus FMI1CSSimulate(const FMISimulationSettings* s) {
}
}

if (status != FMIFatal) {
if (status != FMIFatal && S->component) {
FMI1FreeSlaveInstance(S);
}

Expand Down
2 changes: 1 addition & 1 deletion fmusim/FMI1MESimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ FMIStatus FMI1MESimulate(const FMISimulationSettings* s) {
}
}

if (status != FMIFatal) {
if (status != FMIFatal && S->component) {
FMI1FreeModelInstance(S);
}

Expand Down
2 changes: 1 addition & 1 deletion fmusim/FMI2CSSimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ FMIStatus FMI2CSSimulate(const FMISimulationSettings* s) {
}
}

if (status != FMIFatal) {
if (status != FMIFatal && S->component) {
FMI2FreeInstance(S);
}

Expand Down
2 changes: 1 addition & 1 deletion fmusim/FMI2MESimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ FMIStatus FMI2MESimulate(const FMISimulationSettings* s) {
}
}

if (status != FMIFatal) {
if (status != FMIFatal && S->component) {
FMI2FreeInstance(S);
}

Expand Down
2 changes: 1 addition & 1 deletion fmusim/FMI3CSSimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ FMIStatus FMI3CSSimulate(const FMISimulationSettings* s) {
}
}

if (status != FMIFatal) {
if (status != FMIFatal && S->component) {
FMI3FreeInstance(S);
}

Expand Down
2 changes: 1 addition & 1 deletion fmusim/FMI3MESimulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ FMIStatus FMI3MESimulate(const FMISimulationSettings* s) {
}
}

if (status != FMIFatal) {
if (status != FMIFatal && S->component) {
FMI3FreeInstance(S);
}

Expand Down