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

patch 9.1.1087: Vim9: import with extends may crash

Problem:  Vim9: import with extends may crash
Solution: check otv for being NULL before trying to access it
          (Hirohito Higashi)

closes: #16601

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Hirohito Higashi
2025-02-09 16:41:23 +01:00
committed by Christian Brabandt
parent 76bdb82527
commit 645a4288e2
3 changed files with 48 additions and 2 deletions

View File

@@ -2461,8 +2461,14 @@ execute_storeindex(isn_T *iptr, ectx_T *ectx)
otv = class->class_members_tv;
}
clear_tv(&otv[lidx]);
otv[lidx] = *tv;
if (otv != NULL)
{
clear_tv(&otv[lidx]);
otv[lidx] = *tv;
}
else
status = FAIL;
}
else
{