mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 09:51:41 +00:00
[qfcc] Check init exists before checking compound
Fixes a segfault that occurred during a parse error in a def initializer.
This commit is contained in:
parent
6f71ef6657
commit
6144100d9b
1 changed files with 1 additions and 1 deletions
|
@ -559,7 +559,7 @@ initialize_def (symbol_t *sym, expr_t *init, defspace_t *space,
|
|||
}
|
||||
if (!sym->s.def) {
|
||||
if (is_array (sym->type) && !type_size (sym->type)
|
||||
&& init->type == ex_compound) {
|
||||
&& init && init->type == ex_compound) {
|
||||
sym->type = array_type (sym->type->t.array.type,
|
||||
num_elements (init));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue