X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc1fcb9584a9c87a7724c04ccbd957fe78f5b94a..625cb8c0b1ac12f26265cae2c69d7f510de0edb1:/src/gtk1/radiobox.cpp?ds=sidebyside diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index fe7709a31d..64881d7cfc 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -11,10 +11,12 @@ #pragma implementation "radiobox.h" #endif -#include "wx/radiobox.h" +#include "wx/defs.h" #if wxUSE_RADIOBOX +#include "wx/radiobox.h" + #include "wx/dialog.h" #include "wx/frame.h" #include "wx/log.h" @@ -187,7 +189,9 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, m_widget = gtk_frame_new( title.mbc_str() ); - m_majorDim = majorDim; + // majorDim may be 0 if all trailing parameters were omitted, so don't + // assert here but just use the correct value for it + m_majorDim = majorDim == 0 ? n : majorDim; GtkRadioButton *m_radio = (GtkRadioButton*) NULL;