diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index fe7709a31d..9030add731 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -187,7 +187,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; diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index fe7709a31d..9030add731 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -187,7 +187,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;