Skip to content

Commit 78524f2

Browse files
authored
in the frame check to see if content isn't null before trying to recycle it (#519)
1 parent 64def74 commit 78524f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rsocket-core/src/main/java/io/rsocket/Frame.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public Frame touch(@Nullable Object hint) {
159159
*/
160160
@Override
161161
public boolean release() {
162-
if (content.release()) {
162+
if (content != null && content.release()) {
163163
recycle();
164164
return true;
165165
}
@@ -175,7 +175,7 @@ public boolean release() {
175175
*/
176176
@Override
177177
public boolean release(int decrement) {
178-
if (content.release(decrement)) {
178+
if (content != null && content.release(decrement)) {
179179
recycle();
180180
return true;
181181
}

0 commit comments

Comments
 (0)