aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 9f21c34..33abe18 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -1699,7 +1699,7 @@ namespace QuickMedia {
current_page = PageType::CHAT;
current_chat_room = matrix->get_room_by_id(tmp_matrix_chat_page->room_id);
- while(window.isOpen()) {
+ while(window.isOpen() && current_chat_room) {
auto matrix_chat_page = std::make_unique<MatrixChatPage>(this, current_chat_room->id, rooms_page);
bool move_room = chat_page(matrix_chat_page.get(), current_chat_room);
matrix_chat_page->messages_tab_visible = false;