aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Matrix.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index b102cfa..9da6185 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -274,6 +274,7 @@ namespace QuickMedia {
void RoomData::clear_data() {
std::lock_guard<std::recursive_mutex> lock(room_mutex);
//fetched_messages_by_event_id.clear();
+ userdata = nullptr;
user_info_by_user_id.clear();
messages.clear();
messages_read_index = 0;
@@ -460,7 +461,9 @@ namespace QuickMedia {
last_unread_message = last_new_message.get();
BodyItem *room_body_item = static_cast<BodyItem*>(room->userdata);
- assert(room_body_item);
+ //assert(room_body_item);
+ if(!room_body_item)
+ return;
if(last_unread_message) {
std::string room_desc = "Unread: " + matrix->message_get_author_displayname(last_unread_message) + ": " + extract_first_line_elipses(last_unread_message->body, 150);