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