mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 15:04:57 +00:00
Fix possible crash in sticker preview.
This commit is contained in:
@@ -363,6 +363,10 @@ QSize MediaPreviewWidget::currentDimensions() const {
|
||||
result = result.scaled(box, Qt::KeepAspectRatio);
|
||||
}
|
||||
|
||||
result = QSize(
|
||||
std::max(result.width(), 1),
|
||||
std::max(result.height(), 1));
|
||||
|
||||
if (_photo) {
|
||||
_cachedSize = result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user