From a0eafc9d8e5655653be4e95f37398b01bbe1f383 Mon Sep 17 00:00:00 2001 From: krcroft Date: Sat, 18 Jan 2020 15:28:42 -0800 Subject: [PATCH] Fix NULL issues in render_templates_hq.h --- src/gui/render_templates_hq.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/render_templates_hq.h b/src/gui/render_templates_hq.h index 3bfd65e3..1fdc001e 100644 --- a/src/gui/render_templates_hq.h +++ b/src/gui/render_templates_hq.h @@ -66,6 +66,9 @@ static inline void conc2d(InitLUTs,SBPP)(void) int Y, u, v; _RGBtoYUV = (Bit32u *)malloc(65536 * sizeof(Bit32u)); + if (_RGBtoYUV == nullptr) { + return; + } for (int color = 0; color < 65536; ++color) { #if SBPP == 32