Initialize Passive Viewer's internal mjModel and mjData to nullptr.

Prevents the render thread from calling `mjv_updateScene` before these have been initialized.

PiperOrigin-RevId: 761181568
Change-Id: I4f7f61fdcf7f87dcd6317883e5082d9ce2266e20
This commit is contained in:
Yuval Tassa
2025-05-20 12:18:14 -07:00
committed by Copybara-Service
parent b728a50eb2
commit 85c84c1ece
+2 -2
View File
@@ -132,8 +132,8 @@ class Simulate {
// in passive mode the user owns m_ and d_, these "passive" instances are
// owned by Simulate, updated from the user by the Sync() method
mjModel* m_passive_;
mjData* d_passive_;
mjModel* m_passive_ = nullptr;
mjData* d_passive_ = nullptr;
std::vector<mjvGeom> user_scn_geoms_;
mjOption mjopt_prev_;