Fix wxQT crash if wxRadioBox is created without wxRA_SPECIFY_XXX
Fall back to wxRA_SPECIFY_COLS if neither it nor wxRA_SPECIFY_ROWS is given instead of not initializing m_qtBoxLayout at all in this case and subsequently crashing due to it. Closes https://github.com/wxWidgets/wxWidgets/pull/1125
This commit is contained in:
		
				
					committed by
					
						
						Vadim Zeitlin
					
				
			
			
				
	
			
			
			
						parent
						
							aa422c6be2
						
					
				
				
					commit
					dfdbba7ebc
				
			@@ -146,6 +146,9 @@ bool wxRadioBox::Create(wxWindow *parent,
 | 
			
		||||
    m_qtGroupBox->setTitle( wxQtConvertString( title ) );
 | 
			
		||||
    m_qtButtonGroup = new wxQtButtonGroup( m_qtGroupBox, this );
 | 
			
		||||
 | 
			
		||||
    if ( !(style & (wxRA_SPECIFY_ROWS | wxRA_SPECIFY_COLS)) )
 | 
			
		||||
        style |= wxRA_SPECIFY_COLS;
 | 
			
		||||
 | 
			
		||||
    // wxRA_SPECIFY_COLS means that we arrange buttons in
 | 
			
		||||
    // left to right order and GetMajorDim() is the number of columns while
 | 
			
		||||
    // wxRA_SPECIFY_ROWS means that the buttons are arranged top to bottom and
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user