From 2af6a893c1ef4ccc95169225bdb16eea4e88bfef Mon Sep 17 00:00:00 2001 From: shahramn Date: Fri, 20 Dec 2024 18:06:37 +0000 Subject: [PATCH] Guard against case when no argument is passed in --- src/accessor/grib_accessor_class_evaluate.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/accessor/grib_accessor_class_evaluate.cc b/src/accessor/grib_accessor_class_evaluate.cc index 1e583cd11..61bf8d6b8 100644 --- a/src/accessor/grib_accessor_class_evaluate.cc +++ b/src/accessor/grib_accessor_class_evaluate.cc @@ -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);