mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Don't unload OMEMO cryto on disconnect if OMEMO wasn't loaded
If OMEMO wasn't loaded, removing key would create empty identity.txt file. Then at load time it would segfault profanity. Another commit should fix load of malformed identity.txt.
This commit is contained in:
parent
0857b5ee4e
commit
c33d8e5f0b
@ -241,6 +241,10 @@ omemo_on_connect(ProfAccount *account)
|
||||
void
|
||||
omemo_on_disconnect(void)
|
||||
{
|
||||
if (!loaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
signal_protocol_signed_pre_key_remove_key(omemo_ctx.store, omemo_ctx.signed_pre_key_id);
|
||||
_g_hash_table_free(omemo_ctx.signed_pre_key_store);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user