diff options
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 547ac29bed..3bf584ff2f 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -803,6 +803,9 @@ void api_free_dictionary(Dictionary value) void api_clear_error(Error *value) FUNC_ATTR_NONNULL_ALL { + if (!value->set) { + return; + } xfree(value->msg); value->msg = NULL; } |