diff options
Diffstat (limited to 'src/nvim/sign.c')
-rw-r--r-- | src/nvim/sign.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/sign.c b/src/nvim/sign.c index 753c814110..d0c093d93a 100644 --- a/src/nvim/sign.c +++ b/src/nvim/sign.c @@ -122,17 +122,17 @@ static signgroup_T *sign_group_ref(const char *groupname) /// removed, then remove the group. static void sign_group_unref(char *groupname) { - signgroup_T *group; - hashitem_T *hi = hash_find(&sg_table, groupname); - if (!HASHITEM_EMPTY(hi)) { - group = HI2SG(hi); - group->sg_refcount--; - if (group->sg_refcount == 0) { - // All the signs in this group are removed - hash_remove(&sg_table, hi); - xfree(group); - } + if (HASHITEM_EMPTY(hi)) { + return; + } + + signgroup_T *group = HI2SG(hi); + group->sg_refcount--; + if (group->sg_refcount == 0) { + // All the signs in this group are removed + hash_remove(&sg_table, hi); + xfree(group); } } |