summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2021-11-09 18:34:40 -0500
committerJoseph Donofry <joedonofry@gmail.com>2021-11-09 18:34:40 -0500
commitc68c8de74f748ea59cdade64b74e474130ef5456 (patch)
treebfbde05f507d595cfa0864ac7fbc37282fd62356 /src
parentIncorporate nico's suggestions, fix volume slider (diff)
parentFix parsing some exotic image packs (diff)
downloadnheko-c68c8de74f748ea59cdade64b74e474130ef5456.tar.xz
Merge remote-tracking branch 'nheko-im/master' into video_player_enhancements
Diffstat (limited to 'src')
-rw-r--r--src/Cache_p.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Cache_p.h b/src/Cache_p.h

index a529bc37..b995eed1 100644 --- a/src/Cache_p.h +++ b/src/Cache_p.h
@@ -29,6 +29,7 @@ #include "CacheCryptoStructs.h" #include "CacheStructs.h" +#include "Logging.h" class Cache : public QObject { @@ -518,8 +519,12 @@ private: while (cursor.get(typeStrV, data, first ? MDB_FIRST_DUP : MDB_NEXT_DUP)) { first = false; - if (eventsDb.get(txn, json::parse(data)["id"].get<std::string>(), value)) - events.push_back(json::parse(value).get<mtx::events::StateEvent<T>>()); + try { + if (eventsDb.get(txn, json::parse(data)["id"].get<std::string>(), value)) + events.push_back(json::parse(value).get<mtx::events::StateEvent<T>>()); + } catch (std::exception &e) { + nhlog::db()->warn("Failed to parse state event: {}", e.what()); + } } } }