diff --git a/src/common/command.c b/src/common/command.c index c5f8d021a..021cd3d2c 100644 --- a/src/common/command.c +++ b/src/common/command.c @@ -464,7 +464,7 @@ explode_string (char *string, char *separators, int num_items_max, n_items = num_items_max; - if (string == NULL) + if (!string || !string[0]) return NULL; if (num_items_max == 0) diff --git a/weechat/src/common/command.c b/weechat/src/common/command.c index c5f8d021a..021cd3d2c 100644 --- a/weechat/src/common/command.c +++ b/weechat/src/common/command.c @@ -464,7 +464,7 @@ explode_string (char *string, char *separators, int num_items_max, n_items = num_items_max; - if (string == NULL) + if (!string || !string[0]) return NULL; if (num_items_max == 0)