#931 : Avoid null pointer access

This commit is contained in:
Magne Sjaastad
2016-10-25 09:00:52 +02:00
parent b091333daa
commit 1e7e0fdc7a
2 changed files with 21 additions and 9 deletions

View File

@@ -114,8 +114,9 @@ void getDayMonthYear(const ecl_kw_type* intehead_kw, int* day, int* month, int*
//--------------------------------------------------------------------------------------------------
void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector<QDateTime>* timeSteps)
{
if (!ecl_file) return;
CVF_ASSERT(timeSteps);
CVF_ASSERT(ecl_file);
// Get the number of occurrences of the INTEHEAD keyword
int numINTEHEAD = ecl_file_get_num_named_kw(ecl_file, INTEHEAD_KW);