changeset 526 | ba7df2cd0371 |
parent 524 | 03eea2f0762c |
child 527 | 7bc4c80ef02c |
--- a/mojoshader_assembler.c Sun Dec 21 00:08:00 2008 -0500 +++ b/mojoshader_assembler.c Sun Dec 21 05:06:05 2008 -0500 @@ -1712,8 +1712,11 @@ void *ptr = Malloc(ctx, ctx->ctab_allocation); if (ptr == NULL) return 0; - memcpy(ptr, ctx->ctab, ctx->ctab_len); - Free(ctx, ctx->ctab); + if (ctx->ctab != NULL) + { + memcpy(ptr, ctx->ctab, ctx->ctab_len); + Free(ctx, ctx->ctab); + } // if ctx->ctab = (uint8 *) ptr; } // if