summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cache.cpp')
-rw-r--r--src/Cache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp

index 3ef3ca07..fb2ded7d 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp
@@ -1423,7 +1423,8 @@ Cache::getRoomAvatarUrl(lmdb::txn &txn, StateEvent<Avatar> msg = json::parse(std::string(event.data(), event.size())); - return QString::fromStdString(msg.content.url); + if (!msg.content.url.empty()) + return QString::fromStdString(msg.content.url); } catch (const json::exception &e) { nhlog::db()->warn("failed to parse m.room.avatar event: {}", e.what()); }