Skip to content

Commit

Permalink
in the frame check to see if content isn't null before trying to recy…
Browse files Browse the repository at this point in the history
…cle it (#519)
  • Loading branch information
robertroeser committed Jul 27, 2018
1 parent 64def74 commit 78524f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rsocket-core/src/main/java/io/rsocket/Frame.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public Frame touch(@Nullable Object hint) {
*/
@Override
public boolean release() {
if (content.release()) {
if (content != null && content.release()) {
recycle();
return true;
}
Expand All @@ -175,7 +175,7 @@ public boolean release() {
*/
@Override
public boolean release(int decrement) {
if (content.release(decrement)) {
if (content != null && content.release(decrement)) {
recycle();
return true;
}
Expand Down

0 comments on commit 78524f2

Please sign in to comment.