mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
fix(api): crash on invalid buffer to nvim_buf_del_user_command (#31908)
This commit is contained in:
@@ -931,6 +931,9 @@ void nvim_buf_del_user_command(Buffer buffer, String name, Error *err)
|
||||
gap = &ucmds;
|
||||
} else {
|
||||
buf_T *buf = find_buffer_by_handle(buffer, err);
|
||||
if (ERROR_SET(err)) {
|
||||
return;
|
||||
}
|
||||
gap = &buf->b_ucmds;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user