From a741dadf208fc13682ad679891bde02fcac6ca29 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 19 Jun 2016 23:09:19 +0200 Subject: [PATCH] Prevent dereference before null check --- cores/libretro-ffmpeg/fft/fft.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cores/libretro-ffmpeg/fft/fft.cpp b/cores/libretro-ffmpeg/fft/fft.cpp index 75ee01c322..d73f5684da 100644 --- a/cores/libretro-ffmpeg/fft/fft.cpp +++ b/cores/libretro-ffmpeg/fft/fft.cpp @@ -711,6 +711,9 @@ static void fft_context_destroy(glfft_t *fft) extern "C" void glfft_free(glfft_t *fft) { + if (!fft) + return; + fft_context_destroy(fft); if (fft) free(fft);