1
0
forked from aniani/vim

patch 9.0.1375: crash when getting member of obj of unknown class

Problem:    Crash when getting member of obj of unknown class.
Solution:   Check for NULL class and give an error message. (Ernie Rael,
            closes #12096)
This commit is contained in:
Ernie Rael
2023-03-03 15:05:30 +00:00
committed by Bram Moolenaar
parent c727b19e9f
commit f77a7f704f
4 changed files with 30 additions and 0 deletions

View File

@@ -293,6 +293,13 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
}
}
if (cl == NULL)
{
// TODO: this should not give an error but be handled at runtime
emsg(_(e_incomplete_type));
return FAIL;
}
++*arg;
char_u *name = *arg;
char_u *name_end = find_name_end(name, NULL, NULL, FNE_CHECK_START);