Merge pull request #303 from dragos-oancea/switch_core_video-nullptr

[core] scan-build: Dereference of null pointer (loaded from variable 'txt') - switch_img_write_text_img(
This commit is contained in:
Andrey Volk 2020-02-12 00:57:54 +04:00 committed by GitHub
commit 9ede52517c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);