From 2ca9be1c6cd7641ebe03069d77064fb4eca76d63 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Mon, 9 May 2011 21:47:41 +0000 Subject: Fix nasty crash bug --- src/tools/asm/q3asm.c | 4 ++++ 1 file changed, 4 insertions(+) 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++) { -- cgit