summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-11-09 20:21:40 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-11-09 20:22:02 +0100
commitd11fcb0ff625964a77329228590fd68025753791 (patch)
tree3caed1e9bfecbcf16e14cf5cb4abd0ae8ef6e84e
parentMerge pull request #798 from LorenDB/fixRRDialog (diff)
downloadnheko-d11fcb0ff625964a77329228590fd68025753791.tar.xz
Fix parsing some exotic image packs
-rw-r--r--CMakeLists.txt2
-rw-r--r--io.github.NhekoReborn.Nheko.yaml2
-rw-r--r--src/Cache_p.h9
3 files changed, 9 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt

index d033d00f..0c43721f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -388,7 +388,7 @@ if(USE_BUNDLED_MTXCLIENT) FetchContent_Declare( MatrixClient GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git - GIT_TAG fc5d01c775bde656b6d69954189522d138efe022 + GIT_TAG bacb7e524ff0f38591b88b248d8d8409b7fd49a0 ) set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "") set(BUILD_LIB_TESTS OFF CACHE INTERNAL "") diff --git a/io.github.NhekoReborn.Nheko.yaml b/io.github.NhekoReborn.Nheko.yaml
index fdd22ea6..af010422 100644 --- a/io.github.NhekoReborn.Nheko.yaml +++ b/io.github.NhekoReborn.Nheko.yaml
@@ -163,7 +163,7 @@ modules: buildsystem: cmake-ninja name: mtxclient sources: - - commit: fc5d01c775bde656b6d69954189522d138efe022 + - commit: bacb7e524ff0f38591b88b248d8d8409b7fd49a0 type: git url: https://github.com/Nheko-Reborn/mtxclient.git - config-opts: 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()); + } } } }