vim-patch:7.4.1866

Problem:    Invalid memory access when exiting with EXITFREE defined.
            (Dominique Pelle)
Solution:   Set "really_exiting" and skip error messages.

a96732150c

This fails to build, due to a00c2e0ecb
removing really_exiting from globals.h, but the next commit fixes the
build failure.
This commit is contained in:
James McCoy
2017-01-01 22:34:17 -05:00
parent c5f4b92ff9
commit 1feaa450cb
3 changed files with 8 additions and 2 deletions

View File

@@ -21569,7 +21569,10 @@ void func_unref(char_u *name)
if (name != NULL && isdigit(*name)) {
fp = find_func(name);
if (fp == NULL) {
EMSG2(_(e_intern2), "func_unref()");
// Ignore when invoked through free_all_mem().
if (!really_exiting) {
EMSG2(_(e_intern2), "func_unref()");
}
} else {
user_func_unref(fp);
}