mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
Fix nasty crash bug
This commit is contained in:
parent
36314a1622
commit
2eb9975334
1 changed files with 4 additions and 0 deletions
|
@ -386,8 +386,12 @@ static void sort_symbols ()
|
||||||
symbol_t *s;
|
symbol_t *s;
|
||||||
symbol_t **symlist;
|
symbol_t **symlist;
|
||||||
|
|
||||||
|
if(!symbols)
|
||||||
|
return;
|
||||||
|
|
||||||
//crumb("sort_symbols: Constructing symlist array\n");
|
//crumb("sort_symbols: Constructing symlist array\n");
|
||||||
for (elems = 0, s = symbols; s; s = s->next, elems++) /* nop */ ;
|
for (elems = 0, s = symbols; s; s = s->next, elems++) /* nop */ ;
|
||||||
|
|
||||||
symlist = malloc(elems * sizeof(symbol_t*));
|
symlist = malloc(elems * sizeof(symbol_t*));
|
||||||
for (i = 0, s = symbols; s; s = s->next, i++)
|
for (i = 0, s = symbols; s; s = s->next, i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue