[core] scan-build: Dereference of null pointer (loaded from variable 'txt') - switch_img_write_text_img()

This commit is contained in:
Dragos Oancea 2020-01-31 23:43:37 +00:00
parent 8f8e74cae9
commit 8247dfc475
1 changed files with 4 additions and 0 deletions

View 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);