From 5c9ab213569d985666c0c16b66d08dfa14ddbd5f Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Thu, 30 Jan 2025 11:58:16 +0100 Subject: [PATCH] Fix crash in contact creation with no SIP address --- Linphone/tool/Utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Linphone/tool/Utils.cpp b/Linphone/tool/Utils.cpp index efdbd4275..3577da46c 100644 --- a/Linphone/tool/Utils.cpp +++ b/Linphone/tool/Utils.cpp @@ -385,7 +385,8 @@ VariantObject *Utils::findFriendByAddress(const QString &address) { }); // Rebuild friend if needed auto updateValue = [data, address](const std::shared_ptr &f) -> void { - if (f->getAddress()->weakEqual(ToolModel::interpretUrl(address))) data->invokeRequestValue(); + if (f && f->getAddress() && f->getAddress()->weakEqual(ToolModel::interpretUrl(address))) + data->invokeRequestValue(); }; data->makeUpdateCond(CoreModel::getInstance().get(), &CoreModel::friendCreated, updateValue); // New Friend data->makeUpdateCond(CoreModel::getInstance().get(), &CoreModel::friendRemoved, updateValue); // New Friend