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:
committed by
Bram Moolenaar
parent
c727b19e9f
commit
f77a7f704f
@@ -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);
|
||||
|
Reference in New Issue
Block a user