From 1db8aee539dea8942dafa30a8281f29f2d8704c8 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Sat, 15 Sep 2018 00:51:55 -0400 Subject: [PATCH] 455: Mixed D+C fix --- src/p_spec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_spec.c b/src/p_spec.c index 88a046b37..a408b2140 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -7484,6 +7484,8 @@ static void P_ResetColormapFader(sector_t *sector) static void Add_ColormapFader(sector_t *sector, extracolormap_t *source_exc, extracolormap_t *dest_exc, boolean ticbased, INT32 duration) { + fadecolormap_t *d; + P_ResetColormapFader(sector); // nothing to do, set immediately @@ -7493,7 +7495,7 @@ static void Add_ColormapFader(sector_t *sector, extracolormap_t *source_exc, ext return; } - fadecolormap_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL); + d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL); d->thinker.function.acp1 = (actionf_p1)T_FadeColormap; d->sector = sector; d->source_exc = source_exc;