Commit ab7a991b authored by hpi1's avatar hpi1

gc_run(): check if GC_NAV_CMDS *cmds is NULL before writing to it

parent 4c14f4f6
......@@ -499,9 +499,11 @@ static void _set_button_page(GRAPHICS_CONTROLLER *gc, uint32_t param, GC_NAV_CMD
void gc_run(GRAPHICS_CONTROLLER *gc, gc_ctrl_e ctrl, uint32_t param, GC_NAV_CMDS *cmds)
{
cmds->num_nav_cmds = 0;
cmds->nav_cmds = NULL;
cmds->sound_id_ref = -1;
if (cmds) {
cmds->num_nav_cmds = 0;
cmds->nav_cmds = NULL;
cmds->sound_id_ref = -1;
}
if (!gc || !gc->igs || !gc->igs->ics) {
ERROR("gc_run(): no interactive composition\n");
......
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