From 95ae67d1f4f0150a9225de73fc3e2df59dcd35f2 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 18 Feb 2017 11:38:56 -0800 Subject: [PATCH] Avoid using negative width --- src/generic/srchctlg.cpp | 1 + 1 file changed, 1 insertion(+) 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);