RAPPEL : Opération de maintenance > ForgeMIA indisponible le 20 Janvier entre 7h et 12h

Commit 11af0c74 authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

core: remove observer when removing model

parent 4d4106c4
Pipeline #11728 passed with stage
in 1 minute and 9 seconds
......@@ -4844,6 +4844,12 @@ public:
if (!mdl)
return status::success;
if (auto* obs = observers.try_to_get(mdl->obs_id); obs) {
obs->model = static_cast<model_id>(0);
mdl->obs_id = static_cast<observer_id>(0);
observers.free(*obs);
}
switch (mdl->type) {
case dynamics_type::none:
do_deallocate(none_models.get(mdl->id));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment