Check if file pointer is present before creating a new file pointer

p4#: 21295
This commit is contained in:
Magne Sjaastad 2013-04-16 08:25:43 +02:00
parent 9e588e38c3
commit e9743257ea

View File

@ -54,7 +54,11 @@ bool RifEclipseUnifiedRestartFileAccess::open()
//--------------------------------------------------------------------------------------------------
bool RifEclipseUnifiedRestartFileAccess::openFile()
{
m_ecl_file = ecl_file_open(m_filename.toAscii().data());
if (!m_ecl_file)
{
m_ecl_file = ecl_file_open(m_filename.toAscii().data());
}
if (!m_ecl_file) return false;
return true;