From 95b14dac4a40c7e1507793a0f31ede2e58dbb855 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Wed, 27 Mar 2024 10:03:47 +0000 Subject: [PATCH] Fix crash in vhpi_iterator with --vhpi-trace --- src/vhpi/vhpi-model.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vhpi/vhpi-model.c b/src/vhpi/vhpi-model.c index 9b58be2f..c3d1fa72 100644 --- a/src/vhpi/vhpi-model.c +++ b/src/vhpi/vhpi-model.c @@ -686,7 +686,7 @@ static const char *handle_pp(vhpiHandleT handle) tb_printf(tb, " Name=%s", n->Name); c_iterator *it = is_iterator(obj); - if (it != NULL) + if (it != NULL && it->list != NULL) tb_printf(tb, " pos=%d/%d", it->pos, it->list->count); tb_append(tb, '}'); -- 2.39.2