Guard against case when no argument is passed in

This commit is contained in:
shahramn 2024-12-20 18:06:37 +00:00
parent 16f184569b
commit 2af6a893c1
1 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,8 @@ void grib_accessor_evaluate_t::init(const long l, grib_arguments* c)
int grib_accessor_evaluate_t::unpack_long(long* val, size_t* len)
{
if (!arg_) return GRIB_INVALID_ARGUMENT;
grib_handle* h = grib_handle_of_accessor(this);
grib_expression* e = arg_->get_expression(h, 0);