From 1779ba8da9a45a984a85cc75afb591b8da837ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Thu, 23 May 2019 21:51:23 -0300 Subject: [PATCH] Stack overflow fix. --HG-- branch : dev --- src/eepp/ui/uilinearlayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eepp/ui/uilinearlayout.cpp b/src/eepp/ui/uilinearlayout.cpp index ecd7409d4..236273d1d 100644 --- a/src/eepp/ui/uilinearlayout.cpp +++ b/src/eepp/ui/uilinearlayout.cpp @@ -126,7 +126,7 @@ void UILinearLayout::packVertical() { { int w = mDpSize.getWidth() - widget->getLayoutMargin().Left - widget->getLayoutMargin().Right - mPadding.Left - mPadding.Right; - if ( (int)widget->getSize().getWidth() != w ) + if ( (int)widget->getSize().getWidth() != w && w > 0 ) widget->setSize( w, widget->getSize().getHeight() ); break; @@ -278,7 +278,7 @@ void UILinearLayout::packHorizontal() { { int h = mDpSize.getHeight() - widget->getLayoutMargin().Top - widget->getLayoutMargin().Bottom - mPadding.Top - mPadding.Bottom; - if ( h != (int)widget->getSize().getHeight() ) + if ( h != (int)widget->getSize().getHeight() && h > 0 ) widget->setSize( widget->getSize().getWidth(), h ); break;