mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-21 00:23:56 +08:00
Use base::SafeRound instead of std::round.
Previous assertion violations because of NaN from std::round were in video streaming, see commits27d58ba07b,8f5830d520. Now the crashes happened in the ConvertScale() call from a background thread when preparing an image from clipboard for sending to a chat.
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Ui {
|
||||
namespace {
|
||||
|
||||
int Round(float64 value) {
|
||||
return int(std::round(value));
|
||||
return int(base::SafeRound(value));
|
||||
}
|
||||
|
||||
class Layouter {
|
||||
|
||||
Reference in New Issue
Block a user