mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 06:07:08 +00:00
if viewer is None then no need to close it.
This commit is contained in:
@@ -56,7 +56,8 @@ class MujocoEnv(gym.Env):
|
||||
|
||||
def _render(self, mode='human', close=False):
|
||||
if close:
|
||||
self._get_viewer().finish()
|
||||
if self.viewer is not None:
|
||||
self._get_viewer().finish()
|
||||
return
|
||||
|
||||
if mode == 'rgb_array':
|
||||
|
Reference in New Issue
Block a user