A crash fix, as well as fixes for the latest matrix_client #26

Merged
kallisti5 merged 6 commits from fixes into master 2023-12-29 20:28:16 -06:00
Showing only changes of commit 8f5762219e - Show all commits

View File

@ -23,6 +23,8 @@
#include <ScrollView.h> #include <ScrollView.h>
#include <TranslationUtils.h> #include <TranslationUtils.h>
#include <stdio.h>
#include "AccountDialog.h" #include "AccountDialog.h"
#include "AccountsWindow.h" #include "AccountsWindow.h"
#include "AppMessages.h" #include "AppMessages.h"
@ -683,7 +685,12 @@ ConversationItem*
MainWindow::_EnsureConversationItem(BMessage* msg) MainWindow::_EnsureConversationItem(BMessage* msg)
{ {
BString chat_id = msg->FindString("chat_id"); BString chat_id = msg->FindString("chat_id");
Conversation* chat = Server::Get()->ConversationById(chat_id, msg->FindInt64("instance")); int64 conversation_id = msg->FindInt64("instance");
Conversation* chat = Server::Get()->ConversationById(chat_id, conversation_id);
if (chat == NULL) {
printf("error: Conversation %" B_PRId64 " in '%s' not found!\n", conversation_id, chat_id);
return NULL;
}
_EnsureConversationView(chat); _EnsureConversationView(chat);