debugger_dap: Add null check to add_page_to_array()

This fixes a crash when inspecting an empty array with the `variables`
command.
This commit is contained in:
kichikuou
2026-03-03 08:13:55 +09:00
parent 134168d864
commit e66fe928e5
+2
View File
@@ -411,6 +411,8 @@ static void add_array_elements_to_array(cJSON *array, struct page *page)
static void add_page_to_array(cJSON *array, struct page *page)
{
if (!page)
return;
switch (page->type) {
case GLOBAL_PAGE:
add_globals_to_array(array, page);