mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
clang/'Logic error': assert get_decor_provider(id, true) returns nonnull
nvim_set_decoration_provider() has undefined behavior (if not crash) if get_decor_provider() returns NULL.
This commit is contained in:
parent
68cb51ab0a
commit
6a2f1b1740
@ -2954,6 +2954,7 @@ void nvim_set_decoration_provider(Integer ns_id, DictionaryOf(LuaRef) opts,
|
|||||||
FUNC_API_SINCE(7) FUNC_API_LUA_ONLY
|
FUNC_API_SINCE(7) FUNC_API_LUA_ONLY
|
||||||
{
|
{
|
||||||
DecorProvider *p = get_decor_provider((NS)ns_id, true);
|
DecorProvider *p = get_decor_provider((NS)ns_id, true);
|
||||||
|
assert(p != NULL);
|
||||||
decor_provider_clear(p);
|
decor_provider_clear(p);
|
||||||
|
|
||||||
// regardless of what happens, it seems good idea to redraw
|
// regardless of what happens, it seems good idea to redraw
|
||||||
|
Loading…
Reference in New Issue
Block a user