diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-01-10 01:33:05 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-01-10 01:33:05 -0500 |
commit | 9bf694ff0bd6a4251758524f762847208618c8f3 (patch) | |
tree | 3e97b13c44361ef74f02fa18ffe8c9fea2f9a690 /src/nvim/garray.c | |
parent | 50db0312f941ba489466d7d6b21088f1870429ee (diff) | |
parent | f350655ddd3846f7c1e12a21fcb30d49f90fa6b6 (diff) | |
download | rneovim-9bf694ff0bd6a4251758524f762847208618c8f3.tar.gz rneovim-9bf694ff0bd6a4251758524f762847208618c8f3.tar.bz2 rneovim-9bf694ff0bd6a4251758524f762847208618c8f3.zip |
Merge #3857 'Vim 7.4.{944,945,946,950,953,1032,1055}'.
Diffstat (limited to 'src/nvim/garray.c')
-rw-r--r-- | src/nvim/garray.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/garray.c b/src/nvim/garray.c index 75c3fb9a73..e6cbd9332b 100644 --- a/src/nvim/garray.c +++ b/src/nvim/garray.c @@ -174,6 +174,7 @@ char_u* ga_concat_strings(const garray_T *gap) FUNC_ATTR_NONNULL_RET } /// Concatenate a string to a growarray which contains characters. +/// When "s" is NULL does not do anything. /// /// WARNING: /// - Does NOT copy the NUL at the end! @@ -183,6 +184,10 @@ char_u* ga_concat_strings(const garray_T *gap) FUNC_ATTR_NONNULL_RET /// @param s void ga_concat(garray_T *gap, const char_u *restrict s) { + if (s == NULL) { + return; + } + int len = (int)strlen((char *) s); if (len) { ga_grow(gap, len); |