diff --git a/src/interpreter.c b/src/interpreter.c index 55f1b50e36ebca..63883930b90827 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -140,6 +140,7 @@ static jl_value_t *do_invoke(jl_value_t **args, size_t nargs, interpreter_state jl_method_instance_t *meth = (jl_method_instance_t*)args[0]; assert(jl_is_method_instance(meth)); jl_value_t *result = jl_invoke(argv[0], &argv[1], nargs - 2, meth); + jl_value_t *result = jl_invoke(argv[0], nargs == 2 ? NULL : &argv[1], nargs - 2, meth); JL_GC_POP(); return result; }