From c2115a1f5154f852329fc5efcb76a0e81baf1c28 Mon Sep 17 00:00:00 2001 From: Saran Tunyasuvunakool Date: Tue, 25 Apr 2023 07:10:45 -0700 Subject: [PATCH] Fix a mjvSceneState leak in the passive viewer. PiperOrigin-RevId: 526957248 Change-Id: I4f30faf097da64189607a4b98c6dff04fec773fa --- simulate/simulate.cc | 2 ++ 1 file changed, 2 insertions(+) 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);