diff --git a/src/geo_iterator/grib_iterator_class_lambert_azimuthal_equal_area.cc b/src/geo_iterator/grib_iterator_class_lambert_azimuthal_equal_area.cc index 15eff4bef..a3f2f32f8 100644 --- a/src/geo_iterator/grib_iterator_class_lambert_azimuthal_equal_area.cc +++ b/src/geo_iterator/grib_iterator_class_lambert_azimuthal_equal_area.cc @@ -171,7 +171,7 @@ int LambertAzimuthalEqualArea::init_oblate(grib_handle* h, return GRIB_OUT_OF_MEMORY; } lons_ = (double*)grib_context_malloc(h->context, nv * sizeof(double)); - if (!lats_) { + if (!lons_) { grib_context_log(h->context, GRIB_LOG_ERROR, "%s: Error allocating %zu bytes", ITER, nv * sizeof(double)); return GRIB_OUT_OF_MEMORY; }