From 2e46155f47d3f621c513ba828ca552da25568a15 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Thu, 4 Jun 2020 14:26:35 +0200 Subject: [PATCH] fix tests without olm --- lib/encryption/olm_manager.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/encryption/olm_manager.dart b/lib/encryption/olm_manager.dart index 2d783424..4b5fad27 100644 --- a/lib/encryption/olm_manager.dart +++ b/lib/encryption/olm_manager.dart @@ -56,7 +56,7 @@ class OlmManager { throw ('Upload key failed'); } } catch (_) { - _olmAccount.free(); + _olmAccount?.free(); _olmAccount = null; } } else { @@ -65,7 +65,7 @@ class OlmManager { _olmAccount = olm.Account(); _olmAccount.unpickle(client.userID, olmAccount); } catch (_) { - _olmAccount.free(); + _olmAccount?.free(); _olmAccount = null; } }