mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-18 01:06:29 +00:00
ios: prevent a crash when exiting the app (#4041)
* ios: prevent a crash when exiting the app * log
This commit is contained in:
committed by
GitHub
parent
065c8f8861
commit
505c6cb062
@@ -87,6 +87,11 @@ public func chatInitControllerRemovingDatabases() {
|
||||
|
||||
|
||||
public func chatCloseStore() {
|
||||
// Prevent crash when exiting the app with already closed store (for example, after changing a database passpharase)
|
||||
guard hasChatCtrl() else {
|
||||
logger.error("chatCloseStore: already closed, chatCtrl is nil")
|
||||
return
|
||||
}
|
||||
let err = fromCString(chat_close_store(getChatCtrl()))
|
||||
if err != "" {
|
||||
logger.error("chatCloseStore error: \(err)")
|
||||
|
||||
Reference in New Issue
Block a user