mirror of https://github.com/ecmwf/eccodes.git
Guard against case when no argument is passed in
This commit is contained in:
parent
16f184569b
commit
2af6a893c1
|
@ -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)
|
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_handle* h = grib_handle_of_accessor(this);
|
||||||
grib_expression* e = arg_->get_expression(h, 0);
|
grib_expression* e = arg_->get_expression(h, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue