Skip to content

Commit

Permalink
Added catch of null BufferInfo settings to avoid crashes when BufferI…
Browse files Browse the repository at this point in the history
…nfo hasn't been fully setup.
  • Loading branch information
robertosfield committed Oct 15, 2024
1 parent e96f5d6 commit 4910148
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/vsg/app/TransferTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ void TransferTask::assign(const BufferInfoList& bufferInfoList)

for (auto& bufferInfo : bufferInfoList)
{
if (bufferInfo->buffer)
if (bufferInfo->buffer && bufferInfo->data)
{
DataToCopy& dataToCopy = (bufferInfo->data->properties.dataVariance >= DYNAMIC_DATA_TRANSFER_AFTER_RECORD) ? _lateDataToCopy : _earlyDataToCopy;
dataToCopy.dataMap[bufferInfo->buffer][bufferInfo->offset] = bufferInfo;
}
//else throw "Problem";
else
{
warn("TransferTask::assign(const BufferInfoList& bufferInfoList) bufferInfo incomplete, buffer = ", bufferInfo->buffer, ", data = ", bufferInfo->data);
}
}
}

Expand Down

0 comments on commit 4910148

Please sign in to comment.