Skip to content

Commit

Permalink
Merge pull request #87 from evshary/bugfix_nullptr
Browse files Browse the repository at this point in the history
Fix chunkHeader==nullptr in allocateChunk
  • Loading branch information
Michael Pöhnl authored May 5, 2020
2 parents f777d22 + 75f5d80 commit ba6fa88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions iceoryx_posh/include/iceoryx_posh/internal/popo/publisher.inl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ template <typename SenderPortType>
inline void* Publisher_t<SenderPortType>::allocateChunk(uint32_t payloadSize, bool useDynamicPayloadSizes) noexcept
{
auto chunkHeader = m_sender.reserveChunk(payloadSize, useDynamicPayloadSizes);
if (chunkHeader == nullptr)
{
return nullptr;
}
return chunkHeader->payload();
}

Expand Down

0 comments on commit ba6fa88

Please sign in to comment.