From 21df3dfc40d44ef45833345d73721dc429f9bcc0 Mon Sep 17 00:00:00 2001 From: Afterster Date: Sat, 13 Feb 2016 10:09:15 +0100 Subject: [PATCH] Add check on waveform image creation --- lib/class/waveform.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/class/waveform.class.php b/lib/class/waveform.class.php index a2b31e7f..6dbc6871 100644 --- a/lib/class/waveform.class.php +++ b/lib/class/waveform.class.php @@ -224,6 +224,10 @@ class Waveform // each waveform to be processed with be $height high, but will be condensed // and resized later (if specified) $img = imagecreatetruecolor($data_size / $detail, $height); + if ($img === false) { + debug_event('waveform', 'Cannot create image.', 1); + return null; + } // fill background of image if ($background == "") {