Merge pull request #698 from blattms/prevent-dereferencing-null-point-during-paralle-IO

Prevent dereferencing a null pointer during parallel output.
This commit is contained in:
Atgeirr Flø Rasmussen 2016-05-26 07:53:28 +02:00
commit decdd3185f

View File

@ -269,6 +269,9 @@ namespace Opm
} }
else // all other simply send to the I/O rank else // all other simply send to the I/O rank
{ {
// globalReservoirState will be deferenced even if this rank is not outputting anything
// To prevent dereferencing a nullptr we create an empty container
globalReservoirState_.reset( new SimulationDataContainer( 0, 0, 0));
send.insert( ioRank ); send.insert( ioRank );
} }