Skip to content

Commit

Permalink
Fix NPE in ExchangeSink
Browse files Browse the repository at this point in the history
  • Loading branch information
linzebing authored and losipiuk committed Feb 24, 2022
1 parent d18f8b0 commit 1882032
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private void writeInternal(Slice slice)
private void flushIfNeeded(boolean finished)
{
SliceOutput buffer = currentBuffer;
if (!buffer.isWritable() || finished) {
if (buffer != null && (!buffer.isWritable() || finished)) {
if (!buffer.isWritable()) {
currentBuffer = null;
}
Expand Down

0 comments on commit 1882032

Please sign in to comment.