Fix possible crash in MediaGenericTextPart.

This commit is contained in:
John Preston 2025-03-10 11:00:49 +04:00
parent 9d591ae806
commit 6bd2a7c962
2 changed files with 2 additions and 2 deletions

View file

@ -304,7 +304,7 @@ QSize MediaGenericTextPart::countCurrentSize(int newWidth) {
const auto size = CountOptimalTextSize(
_text,
st::msgMinWidth,
newWidth - skip);
std::max(st::msgMinWidth, newWidth - skip));
return {
size.width() + skip,
_margins.top() + size.height() + _margins.bottom(),

@ -1 +1 @@
Subproject commit 55fff1a85b8d3f4962fe9d2133eb82409df2d8d8
Subproject commit ba969667301ae4d8da2c2f6c4528bea63443f607