]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[core] scan-build: Dereference of null pointer (loaded from variable 'txt') - switch_... 303/head
authorDragos Oancea <dragos@signalwire.com>
Fri, 31 Jan 2020 23:43:37 +0000 (23:43 +0000)
committerDragos Oancea <dragos@signalwire.com>
Fri, 31 Jan 2020 23:43:37 +0000 (23:43 +0000)
src/switch_core_video.c

index 5f6d4902ef2c8129af59336be7b5189af1c26bef..f7352bb0f998866e34b5b0276bd56dfd16043233 100644 (file)
@@ -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);