2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Fix repeated subscriptions on layer wrapping type change.

This commit is contained in:
John Preston
2022-05-23 14:35:39 +04:00
parent 8035fe8771
commit 7fb99319bb
2 changed files with 7 additions and 5 deletions

View File

@@ -244,7 +244,7 @@ int LayerWidget::MinimalSupportedWidth() {
}
int LayerWidget::resizeGetHeight(int newWidth) {
if (!parentWidget() || !_content) {
if (!parentWidget() || !_content || !newWidth) {
return 0;
}
constexpr auto kMaxAttempts = 16;