mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Always set current_symtab in class_init().
But reset current_symtab to its prior value when done. This fixes a segfault caused by initializing the class system while parsing a struct (eg, one of the members is of type id).
This commit is contained in:
parent
ff4b232d92
commit
1c76ccc425
1 changed files with 5 additions and 2 deletions
|
@ -1629,10 +1629,13 @@ class_init_obj_module (void)
|
|||
void
|
||||
class_init (void)
|
||||
{
|
||||
if (!current_symtab)
|
||||
current_symtab = pr.symtab;
|
||||
symtab_t *cs = current_symtab;
|
||||
|
||||
current_symtab = pr.symtab;
|
||||
class_init_obj_module ();
|
||||
init_classes ();
|
||||
init_objective_structs ();
|
||||
obj_initialized = 1;
|
||||
|
||||
current_symtab = cs;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue