mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
eval/typval_encode: Handle NULL partials properly
This commit is contained in:
parent
9c84f3ba3e
commit
06cca5dc59
@ -87,7 +87,7 @@
|
||||
/// @brief Macros used when starting to convert a funcref or a partial
|
||||
///
|
||||
/// @param tv Pointer to typval where value is stored. May not be NULL.
|
||||
/// @param fun Function name.
|
||||
/// @param fun Function name. May be NULL.
|
||||
|
||||
/// @def TYPVAL_ENCODE_CONV_FUNC_BEFORE_ARGS
|
||||
/// @brief Macros used before starting to convert partial arguments
|
||||
@ -317,7 +317,7 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
|
||||
case VAR_PARTIAL: {
|
||||
partial_T *const pt = tv->vval.v_partial;
|
||||
(void)pt;
|
||||
TYPVAL_ENCODE_CONV_FUNC_START(tv, pt->pt_name);
|
||||
TYPVAL_ENCODE_CONV_FUNC_START(tv, (pt == NULL ? NULL : pt->pt_name));
|
||||
_mp_push(*mpstack, ((MPConvStackVal) {
|
||||
.type = kMPConvPartial,
|
||||
.tv = tv,
|
||||
|
Loading…
Reference in New Issue
Block a user