mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 20:38:18 +00:00
api_clear_error: Skip if error was not set.
This commit is contained in:
@@ -803,6 +803,9 @@ void api_free_dictionary(Dictionary value)
|
|||||||
void api_clear_error(Error *value)
|
void api_clear_error(Error *value)
|
||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
|
if (!value->set) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
xfree(value->msg);
|
xfree(value->msg);
|
||||||
value->msg = NULL;
|
value->msg = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user