dbghelp: Protect against missing compiland when adding global function.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52045
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2021-11-22 15:19:59 +01:00 committed by Alexandre Julliard
parent 5e56bc3b21
commit 0bbb161c41
1 changed files with 5 additions and 2 deletions

View File

@ -353,9 +353,12 @@ struct symt_function* symt_new_function(struct module* module,
init_function_or_inlinesite(sym, module, SymTagFunction, &compiland->symt, name, addr, size, sig_type);
sym->next_inlinesite = NULL; /* first of list */
symt_add_module_ht(module, (struct symt_ht*)sym);
if (compiland)
{
p = vector_add(&compiland->vchildren, &module->pool);
*p = &sym->symt;
}
}
return sym;
}