aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-01-05 10:40:02 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-01-05 10:40:53 -0500
commit1aacab49ea0e5cff94bd89595737b6af677f4490 (patch)
tree3d917be003cb49e95a3ea021145701f44cfb39b9 /src/nvim/eval.c
parent3a3fb0860248b42e05de6591d4b7727453efdef2 (diff)
downloadrneovim-1aacab49ea0e5cff94bd89595737b6af677f4490.tar.gz
rneovim-1aacab49ea0e5cff94bd89595737b6af677f4490.tar.bz2
rneovim-1aacab49ea0e5cff94bd89595737b6af677f4490.zip
vim-patch:8.1.1579: dict and list could be GC'ed while displaying error
Problem: Dict and list could be GC'ed while displaying error in a timer. (Yasuhiro Matsumoto) Solution: Block garbage collection when executing a timer. Add test_garbagecollect_soon(). Add "no_wait_return" to test_override(). (closes vim/vim#4571) https://github.com/vim/vim/commit/adc6714aac20f5462a0ecec50ab4806b2f3ab0db
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index cf4d3af232..5c19ce4047 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -5920,7 +5920,7 @@ static int dict_get_tv(char_u **arg, typval_T *rettv, int evaluate)
if (**arg != '}') {
EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg);
failret:
- if (evaluate) {
+ if (d != NULL) {
tv_dict_free(d);
}
return FAIL;