fix crash when eventLog from newEvent signal is null
This commit is contained in:
parent
cdd2783f6c
commit
5622016824
1 changed files with 1 additions and 0 deletions
|
|
@ -211,6 +211,7 @@ void ChatCore::setSelf(QSharedPointer<ChatCore> me) {
|
||||||
const std::shared_ptr<const linphone::EventLog> &eventLog) {
|
const std::shared_ptr<const linphone::EventLog> &eventLog) {
|
||||||
if (mChatModel->getMonitor() != chatRoom) return;
|
if (mChatModel->getMonitor() != chatRoom) return;
|
||||||
lDebug() << "EVENT LOG RECEIVED IN CHATROOM" << mChatModel->getTitle();
|
lDebug() << "EVENT LOG RECEIVED IN CHATROOM" << mChatModel->getTitle();
|
||||||
|
if (!eventLog) return;
|
||||||
auto event = EventLogCore::create(eventLog, chatRoom);
|
auto event = EventLogCore::create(eventLog, chatRoom);
|
||||||
if (event->isHandled()) {
|
if (event->isHandled()) {
|
||||||
mChatModelConnection->invokeToCore([this, event]() { emit eventsInserted({event}); });
|
mChatModelConnection->invokeToCore([this, event]() { emit eventsInserted({event}); });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue