From 71c3620229501e8479612f0888a27d3b5ce6c851 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 8 Sep 2012 15:46:50 +0000 Subject: [PATCH] Check validity of wxSizerFlags::Border() direction parameter. Catch the misguided attempts to pass the size of the border as the first parameter of the Border(direction, size) overload. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/sizer.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/wx/sizer.h b/include/wx/sizer.h index ff462469b2..41da10945d 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -125,6 +125,10 @@ public: wxSizerFlags& Border(int direction, int borderInPixels) { + wxCHECK_MSG( !(direction & ~wxALL), *this, + wxS("direction must be a combination of wxDirection enum " + "values.") ); + m_flags &= ~wxALL; m_flags |= direction; -- 2.50.0