Commit 4c9f5807 authored by Ghislain MARY's avatar Ghislain MARY

Fix potential crash because of the call statistics, the payload type returned...

Fix potential crash because of the call statistics, the payload type returned by getUsedAudioCodec() and getUsedVideoCodec() may be null.
parent 4e0fb40c
......@@ -456,8 +456,8 @@ void CallModel::updateStats (const linphone::CallStats &callStats, QVariantList
stats.clear();
stats << createStat(tr("callStatsCodec"), QString("%1 / %2kHz")
.arg(Utils::linphoneStringToQString(payloadType->getMimeType())).arg(payloadType->getClockRate() / 1000));
stats << createStat(tr("callStatsCodec"), payloadType ? QString("%1 / %2kHz")
.arg(Utils::linphoneStringToQString(payloadType->getMimeType())).arg(payloadType->getClockRate() / 1000) : "");
stats << createStat(tr("callStatsUploadBandwidth"), QString("%1 kbits/s").arg(int(callStats.getUploadBandwidth())));
stats << createStat(tr("callStatsDownloadBandwidth"), QString("%1 kbits/s").arg(int(callStats.getDownloadBandwidth())));
stats << createStat(tr("callStatsIceState"), iceStateToString(callStats.getIceState()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment