diff --git a/simulate/simulate.cc b/simulate/simulate.cc index 6700602a..945058d9 100644 --- a/simulate/simulate.cc +++ b/simulate/simulate.cc @@ -2340,6 +2340,8 @@ void Simulate::RenderLoop() { if (fully_managed_){ mjv_freeScene(&this->scn); + } else { + mjv_freeSceneState(&scnstate_); } this->exitrequest.store(2);