Commit 5106afee authored by Jerome Hugues's avatar Jerome Hugues

* Make sure the process has subcomponents before iterating

parent f4de0d3f
......@@ -999,11 +999,14 @@ package body Ocarina.Backends.C_Common.Types is
-- (see ocarina-backends-po_hi_c-request.adb) are used.
elsif AINU.Is_Process (Corresponding_Instance (C)) then
S := First_Node (Subcomponents (Corresponding_Instance (C)));
while Present (S) loop
Visit_Component_Instance (Corresponding_Instance (S));
S := Next_Node (S);
end loop;
if Present (Subcomponents (Corresponding_Instance (C))) then
S := First_Node
(Subcomponents (Corresponding_Instance (C)));
while Present (S) loop
Visit_Component_Instance (Corresponding_Instance (S));
S := Next_Node (S);
end loop;
end if;
end if;
C := Next_Node (C);
end loop;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment