commit | d13dd30240e32071210f55b587182ff48757ea46 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sat Mar 11 20:56:35 2023 +0000 |
committer | Bram Moolenaar <Bram@vim.org> | Sat Mar 11 20:56:35 2023 +0000 |
tree | 4a752aa8839e10003439f858e8d9125f7907a240 | |
parent | c481ad38f05c9f759ca7fd01a54c78acad794e85 [diff] [blame] |
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.
diff --git a/src/vim9class.c b/src/vim9class.c index 74664f1..8174351 100644 --- a/src/vim9class.c +++ b/src/vim9class.c
@@ -1262,6 +1262,12 @@ 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;