aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-08-18 23:26:49 +1000
committeronefang2021-08-18 23:26:49 +1000
commit6bf694161d810c1614ff06e597442d187e88ad28 (patch)
tree0232ef365b0ce0e756f471a2b3bc553e660f16aa
parentTODO++ (diff)
downloadopensim-SC-6bf694161d810c1614ff06e597442d187e88ad28.zip
opensim-SC-6bf694161d810c1614ff06e597442d187e88ad28.tar.gz
opensim-SC-6bf694161d810c1614ff06e597442d187e88ad28.tar.bz2
opensim-SC-6bf694161d810c1614ff06e597442d187e88ad28.tar.xz
freeSimList() don't do anything if sims isn't allocated.
-rw-r--r--src/sledjchisl/sledjchisl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index dddd054..3e216c0 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -1366,6 +1366,9 @@ void freeSimList(simList *sims)
1366{ 1366{
1367 int i; 1367 int i;
1368 1368
1369 if (NULL == sims)
1370 return;
1371
1369 for (i = 0; i < sims->num; i++) 1372 for (i = 0; i < sims->num; i++)
1370 free(sims->sims[i]); 1373 free(sims->sims[i]);
1371 free(sims->sims); 1374 free(sims->sims);