From bba3941c723e347b7cd0cfa6c0a08adb972e4bc3 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 15 Jun 2026 16:24:40 +0400 Subject: [PATCH] Fix guard check --- .../storage_thread_requests/requests/node_p2p_request.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/storage_thread_requests/requests/node_p2p_request.nim b/library/storage_thread_requests/requests/node_p2p_request.nim index fd19f17f..91a55b1e 100644 --- a/library/storage_thread_requests/requests/node_p2p_request.nim +++ b/library/storage_thread_requests/requests/node_p2p_request.nim @@ -46,9 +46,12 @@ proc createShared*( return ret proc destroyShared*(self: ptr NodeP2PRequest) = + if self == nil: + return + deallocShared(self[].peerId) - if self[] != nil and self[].peerAddresses != nil: + if self[].peerAddresses != nil: deallocShared(self[].peerAddresses) deallocShared(self)