Skip to content

Commit

Permalink
Protect DP_interface call in case NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed May 8, 2020
1 parent 129b501 commit 4495fa2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/adios2/toolkit/sst/cp/cp_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,9 +1451,12 @@ static void NotifyDPArrivedMetadata(SstStream Stream)
if ((TS->MetadataMsg->Metadata != NULL) &&
(TS->MetadataMsg->Timestep > Stream->LastDPNotifiedTimestep))
{
Stream->DP_Interface->timestepArrived(&Svcs, Stream->DP_Stream,
TS->MetadataMsg->Timestep,
TS->MetadataMsg->PreloadMode);
if (Stream->DP_Interface->timestepArrived)
{
Stream->DP_Interface->timestepArrived(
&Svcs, Stream->DP_Stream, TS->MetadataMsg->Timestep,
TS->MetadataMsg->PreloadMode);
}
Stream->LastDPNotifiedTimestep = TS->MetadataMsg->Timestep;
}
TS = TS->Next;
Expand Down

0 comments on commit 4495fa2

Please sign in to comment.