Fix crash when calling wxRadioBox::Show() before Create() in wxQt

This notable happened when the radio box was loaded from XRC.

Closes https://github.com/wxWidgets/wxWidgets/pull/1126
This commit is contained in:
Graham Dawes 2019-01-09 10:05:51 +00:00 committed by Vadim Zeitlin
parent dfdbba7ebc
commit 2969cefb3a

View File

@ -248,6 +248,12 @@ bool wxRadioBox::Show(unsigned int n, bool show)
bool wxRadioBox::Show( bool show )
{
if ( !wxControl::Show(show) )
return false;
if ( !m_qtGroupBox )
return false;
if( m_qtGroupBox->isVisible() == show )
{
for( unsigned int i = 0; i < GetCount(); ++i )