Update library/storage_thread_requests/requests/node_p2p_request.nim

Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
Signed-off-by: Arnaud <arno.deville@gmail.com>
This commit is contained in:
Arnaud 2026-06-15 14:30:52 +04:00 committed by GitHub
parent 6a1499c05c
commit 3e70e792af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,7 +48,7 @@ proc createShared*(
proc destroyShared*(self: ptr NodeP2PRequest) =
deallocShared(self[].peerId)
if self[].peerAddresses != nil:
if self[] != nil and self[].peerAddresses != nil:
deallocShared(self[].peerAddresses)
deallocShared(self)