From 798eaeb9801c621477a910d7272abca02f5397d0 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 19 Mar 2019 17:08:12 +0000 Subject: [PATCH] Allow passing a null pointer to spriteheightofsptr() for the height return value git-svn-id: https://svn.eduke32.com/eduke32@7405 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/engine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index b853c7ce8..b843f690d 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -10230,7 +10230,8 @@ int32_t spriteheightofsptr(const uspritetype *spr, int32_t *height, int32_t also const int32_t picnum=spr->picnum, yrepeat=spr->yrepeat; hei = (tilesiz[picnum].y*yrepeat)<<2; - *height = hei; + if (height != NULL) + *height = hei; if (spr->cstat&128) zofs = hei>>1;