From a089863823453e65bb5d8dea8367739a4ec1ef4b Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Mon, 6 Jan 2020 21:16:33 -0300 Subject: [PATCH] Missing check --- src/r_picformats.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/r_picformats.c b/src/r_picformats.c index b55dac5ad..340fd5bf6 100644 --- a/src/r_picformats.c +++ b/src/r_picformats.c @@ -129,6 +129,8 @@ void *Picture_PatchConvert( if (!inbpp) I_Error("Picture_PatchConvert: unknown input bits per pixel?!"); + if (!Picture_FormatBPP(outformat)) + I_Error("Picture_PatchConvert: unknown output bits per pixel?!"); // If it's a patch, you can just figure out // the dimensions from the header.