mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.1320: checking the type of a null object causes a crash
Problem: Checking the type of a null object causes a crash. Solution: Don't try to get the class of a null object. (closes #12005) Handle error from calling a user function better.
This commit is contained in:
@@ -1283,7 +1283,7 @@ call_ufunc(
|
||||
{
|
||||
typval_T argvars[MAX_FUNC_ARGS];
|
||||
funcexe_T funcexe;
|
||||
int error;
|
||||
funcerror_T error;
|
||||
int idx;
|
||||
int did_emsg_before = did_emsg;
|
||||
compiletype_T compile_type = get_compile_type(ufunc);
|
||||
@@ -1464,10 +1464,10 @@ call_partial(
|
||||
name = tv->vval.v_string;
|
||||
if (name != NULL)
|
||||
{
|
||||
char_u fname_buf[FLEN_FIXED + 1];
|
||||
char_u *tofree = NULL;
|
||||
int error = FCERR_NONE;
|
||||
char_u *fname;
|
||||
char_u fname_buf[FLEN_FIXED + 1];
|
||||
char_u *tofree = NULL;
|
||||
funcerror_T error = FCERR_NONE;
|
||||
char_u *fname;
|
||||
|
||||
// May need to translate <SNR>123_ to K_SNR.
|
||||
fname = fname_trans_sid(name, fname_buf, &tofree, &error);
|
||||
|
Reference in New Issue
Block a user