Avoid using negative width

This commit is contained in:
Paul Cornett 2017-02-18 11:38:56 -08:00
parent dae545ed29
commit 95ae67d1f4

View File

@ -488,6 +488,7 @@ void wxSearchCtrl::LayoutControls()
int horizontalBorder = 1 + ( sizeText.y - sizeText.y * 14 / 21 ) / 2;
int x = horizontalBorder;
width -= horizontalBorder*2;
if (width < 0) width = 0;
wxSize sizeSearch(0,0);
wxSize sizeCancel(0,0);