0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1402: crash when using null_class

Problem:    Crash when using null_class.
Solution:   Give an error when trying to use a null class.
This commit is contained in:
Bram Moolenaar
2023-03-11 20:56:35 +00:00
parent c481ad38f0
commit d13dd30240
3 changed files with 15 additions and 0 deletions

View File

@@ -1262,6 +1262,12 @@ class_object_index(
cl = rettv->vval.v_object->obj_class;
}
if (cl == NULL)
{
emsg(_(e_incomplete_type));
return FAIL;
}
if (*name_end == '(')
{
int on_class = rettv->v_type == VAR_CLASS;