mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-10-11 16:58:27 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user