diff --git a/src/internal.h b/src/internal.h index 6625437..1b00f20 100644 --- a/src/internal.h +++ b/src/internal.h @@ -11,6 +11,9 @@ extern "C" { #define DEINIT_LIST(items, len, item_deinit) \ do { \ + if ((items) == NULL) { \ + break; \ + } \ for (size_t i = 0; i < (len); i++) { \ item_deinit(&((items)[i])); \ } \