diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-05-09 21:47:41 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-09 21:38:38 +0000 |
commit | 2ca9be1c6cd7641ebe03069d77064fb4eca76d63 (patch) | |
tree | 3d053849b4aa9b7c4f1d0c0e1a357d3e31e1a595 | |
parent | fd3328453b89f074ff454bc608420968e3a891e9 (diff) |
Fix nasty crash bug
-rw-r--r-- | src/tools/asm/q3asm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/asm/q3asm.c b/src/tools/asm/q3asm.c index c42b9ac5..6c4c9195 100644 --- a/src/tools/asm/q3asm.c +++ b/src/tools/asm/q3asm.c @@ -387,8 +387,12 @@ static void sort_symbols () symbol_t *s; symbol_t **symlist; + if(!symbols) + return; + //crumb("sort_symbols: Constructing symlist array\n"); for (elems = 0, s = symbols; s; s = s->next, elems++) /* nop */ ; + symlist = malloc(elems * sizeof(symbol_t*)); for (i = 0, s = symbols; s; s = s->next, i++) { |