diff --git a/src/tools/other/mode_graphics/mode_nc_output_file.cc b/src/tools/other/mode_graphics/mode_nc_output_file.cc index b54b9d3601..ce45948a81 100644 --- a/src/tools/other/mode_graphics/mode_nc_output_file.cc +++ b/src/tools/other/mode_graphics/mode_nc_output_file.cc @@ -255,23 +255,17 @@ for (x=0; x init time should be an integer or a string!\n\n"; exit ( 1 ); } - if (att) delete att; - att = get_nc_att(FcstRaw, (string)"valid_time_ut"); - ValidTime = get_att_value_unixtime(att); - if (ValidTime < 0) { + if (!get_att_unixtime(FcstRaw, valid_time_ut_att_name, ValidTime) || ValidTime < 0) { mlog << Error << "ModeNcOutputFile::open(const char *) -> valid time should be an integer or a string!\n\n"; exit ( 1 ); } - if (att) delete att; // att = FcstRaw->get_att("accum_time_sec"); // @@ -1006,6 +1000,3 @@ return ( s ); //////////////////////////////////////////////////////////////////////// - - -