Fix possible crash in sticker preview.

This commit is contained in:
John Preston
2025-11-20 21:48:30 +04:00
parent 0585f9d667
commit ab404c5452
@@ -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;
}