diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index a6f939e3b8..7f35ff68b8 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -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);