X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dca0f651782d5c2659203c97b3243f613966998d..1621f192d95b44c5909a788b8f1fe9e9c381df72:/src/msw/radiobox.cpp?ds=sidebyside

diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp
index 9108095f93..26519adcbb 100644
--- a/src/msw/radiobox.cpp
+++ b/src/msw/radiobox.cpp
@@ -150,6 +150,11 @@ bool wxRadioBox::Create(wxWindow *parent,
     if ( !wxStaticBox::Create(parent, id, title, pos, size, style, name) )
         return false;
 
+    // the code elsewhere in this file supposes that either wxRA_SPECIFY_COLS
+    // or wxRA_SPECIFY_ROWS is set, ensure that this is indeed the case
+    if ( !(style & (wxRA_SPECIFY_ROWS | wxRA_SPECIFY_COLS)) )
+        style |= wxRA_SPECIFY_COLS;
+
 #if wxUSE_VALIDATORS
     SetValidator(val);
 #else