mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Fix possible crash in call error handling.
This commit is contained in:
@@ -409,7 +409,9 @@ void Call::redial() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString Call::getDebugLog() const {
|
QString Call::getDebugLog() const {
|
||||||
return QString::fromStdString(_instance->getDebugInfo());
|
return _instance
|
||||||
|
? QString::fromStdString(_instance->getDebugInfo())
|
||||||
|
: QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Call::startWaitingTrack() {
|
void Call::startWaitingTrack() {
|
||||||
@@ -833,7 +835,9 @@ void Call::handleControllerStateChange(tgcalls::State state) {
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case tgcalls::State::Failed: {
|
case tgcalls::State::Failed: {
|
||||||
auto error = QString::fromStdString(_instance->getLastError());
|
auto error = _instance
|
||||||
|
? QString::fromStdString(_instance->getLastError())
|
||||||
|
: QString();
|
||||||
LOG(("Call Info: State changed to Failed, error: %1.").arg(error));
|
LOG(("Call Info: State changed to Failed, error: %1.").arg(error));
|
||||||
handleControllerError(error);
|
handleControllerError(error);
|
||||||
} break;
|
} break;
|
||||||
|
Reference in New Issue
Block a user