damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 683436738606a6a3689200005d039f90d502a7c9
parent afe3dcf039b1e0e76f3fe8c97d553c92146b26a4
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 10 Jan 2024 15:38:31 -0800

ndb: fix crashed when trying to process client event on a closed db

Diffstat:
Mnostrdb/Ndb.swift | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/nostrdb/Ndb.swift b/nostrdb/Ndb.swift @@ -373,6 +373,7 @@ class Ndb { } func process_client_event(_ str: String) -> Bool { + guard !self.closed else { return false } return str.withCString { cstr in return ndb_process_client_event(ndb.ndb, cstr, Int32(str.utf8.count)) != 0 }