comparison src/vim9execute.c @ 27774:89b1bc6fd40a v8.2.4413

patch 8.2.4413: Vim9: Coverity warns for using NULL pointer Commit: https://github.com/vim/vim/commit/56acd1f8ed4d86e92684f90b3b8e0e9a355208d1 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 18 13:24:52 2022 +0000 patch 8.2.4413: Vim9: Coverity warns for using NULL pointer Problem: Vim9: Coverity warns for using NULL pointer. Solution: Give an internal error when funcref function can't be found.
author Bram Moolenaar <Bram@vim.org>
date Fri, 18 Feb 2022 14:30:02 +0100
parents b081ba78675a
children 5ce69c07a106
comparison
equal deleted inserted replaced
27773:478f5a7f6033 27774:89b1bc6fd40a
3551 } 3551 }
3552 else 3552 else
3553 { 3553 {
3554 ufunc = find_func(funcref->fr_func_name, FALSE); 3554 ufunc = find_func(funcref->fr_func_name, FALSE);
3555 } 3555 }
3556 if (ufunc == NULL)
3557 {
3558 SOURCING_LNUM = iptr->isn_lnum;
3559 iemsg("ufunc unexpectedly NULL for FUNCREF");
3560 goto theend;
3561 }
3556 if (fill_partial_and_closure(pt, ufunc, ectx) == FAIL) 3562 if (fill_partial_and_closure(pt, ufunc, ectx) == FAIL)
3557 goto theend; 3563 goto theend;
3558 tv = STACK_TV_BOT(0); 3564 tv = STACK_TV_BOT(0);
3559 ++ectx->ec_stack.ga_len; 3565 ++ectx->ec_stack.ga_len;
3560 tv->vval.v_partial = pt; 3566 tv->vval.v_partial = pt;