From: Dragos Oancea Date: Fri, 31 Jan 2020 23:43:37 +0000 (+0000) Subject: [core] scan-build: Dereference of null pointer (loaded from variable 'txt') - switch_... X-Git-Tag: v1.10.3^2~205^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F303%2Fhead;p=thirdparty%2Ffreeswitch.git [core] scan-build: Dereference of null pointer (loaded from variable 'txt') - switch_img_write_text_img() --- diff --git a/src/switch_core_video.c b/src/switch_core_video.c index 5f6d4902ef..f7352bb0f9 100644 --- a/src/switch_core_video.c +++ b/src/switch_core_video.c @@ -2139,6 +2139,10 @@ SWITCH_DECLARE(switch_image_t *) switch_img_write_text_img(int w, int h, switch_ switch_image_t *txtimg = NULL; int x = 0, y = 0; + if (!duptxt) { + return NULL; + } + if (strchr(text, ':')) { argc = switch_split(duptxt, ':', argv);