From 82cf27992d15f14ca0ff26cba7d10a28305a1a2e Mon Sep 17 00:00:00 2001 From: Bogdan Graur Date: Wed, 30 Jul 2025 06:15:06 -0700 Subject: [PATCH] Initialize variables in copyM2Sparse PiperOrigin-RevId: 788875024 Change-Id: I87068a3878e0b6bc5227bb61e84c07e75e448eea --- src/engine/engine_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/engine_io.c b/src/engine/engine_io.c index 23a361d1..b3edf055 100644 --- a/src/engine/engine_io.c +++ b/src/engine/engine_io.c @@ -1138,8 +1138,8 @@ static void checkDBSparse(const mjModel* m, mjData* d) { static void copyM2Sparse(const mjModel* m, mjData* d, int* dst, const int* src, int reduced, int upper) { int nv = m->nv; - const int* rownnz; - const int* rowadr; + const int* rownnz = NULL; + const int* rowadr = NULL; if (reduced && !upper) { rownnz = d->M_rownnz; rowadr = d->M_rowadr;