Skip to content

Commit

Permalink
code: restore the original handling for case where null is possible
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Jul 30, 2022
1 parent 8388f2a commit 9aa56a4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/enet.h
Original file line number Diff line number Diff line change
Expand Up @@ -4361,8 +4361,7 @@ extern "C" {
goto notifyError;
}

assert(packet != NULL);
if (packet->referenceCount == 0) {
if (packet != NULL && packet->referenceCount == 0) {
callbacks.packet_destroy(packet);
}

Expand Down

0 comments on commit 9aa56a4

Please sign in to comment.