Skip to content

Commit 7f2f550

Browse files
committed
fixed crash when HBF copy buffer empty
1 parent 7d94766 commit 7f2f550

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ConsumerFMQchannel.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,10 +703,12 @@ class ConsumerFMQchannel : public Consumer
703703
if (dropEntireTFonError) break;
704704
}
705705
}
706-
// ensure end-of-timeframe flag is set for last message
707-
msglist->back().stfHeader->lastTFMessage = 1;
708706
// send msg
709707
if ((!isError)||(!dropEntireTFonError)) {
708+
// ensure end-of-timeframe flag is set for last message
709+
if (msglist->size()) {
710+
msglist->back().stfHeader->lastTFMessage = 1;
711+
}
710712
if (wThreads[thIx].output->push(std::move(msglist))) {
711713
isError = 1;
712714
} else {

0 commit comments

Comments
 (0)