core: return NULL in function string_cut if string is NULL

v2.8-utf8proc
Sébastien Helleu 2018-06-02 15:14:21 +02:00
parent 49253bd4d9
commit 39a291bc53
1 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,9 @@ string_cut (const char *string, int length, int count_suffix, int screen,
char *result;
const char *ptr_string;
if (!string)
return NULL;
if (screen)
ptr_string = gui_chat_string_add_offset_screen (string, length);
else