fix crash when no call associated to conference

This commit is contained in:
Gaelle Braud 2026-02-24 17:20:54 +01:00
parent 7c84741442
commit 7069d57ce7

View file

@ -154,11 +154,16 @@ void ConferenceModel::toggleScreenSharing() {
: linphone::MediaDirection::SendOnly);
}
if (params->isValid()) {
lInfo() << log()
.arg("Toggling screen sharing %1, direction=%2")
.arg(enable)
.arg((int)params->getVideoDirection());
mMonitor->getCall()->update(params);
if (mMonitor->getCall()) {
mMonitor->getCall()->update(params);
lInfo() << log()
.arg("Toggling screen sharing %1, direction=%2")
.arg(enable)
.arg((int)params->getVideoDirection());
} else {
lCritical() << log().arg(
"Cannot toggle screen sharing because call associated to this conference is null");
}
} else lCritical() << log().arg("Cannot toggle screen sharing because parameters are invalid");
}
}