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:
committed by
Vadim Zeitlin
parent
dfdbba7ebc
commit
2969cefb3a
@@ -248,6 +248,12 @@ bool wxRadioBox::Show(unsigned int n, bool show)
|
|||||||
|
|
||||||
bool wxRadioBox::Show( bool show )
|
bool wxRadioBox::Show( bool show )
|
||||||
{
|
{
|
||||||
|
if ( !wxControl::Show(show) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ( !m_qtGroupBox )
|
||||||
|
return false;
|
||||||
|
|
||||||
if( m_qtGroupBox->isVisible() == show )
|
if( m_qtGroupBox->isVisible() == show )
|
||||||
{
|
{
|
||||||
for( unsigned int i = 0; i < GetCount(); ++i )
|
for( unsigned int i = 0; i < GetCount(); ++i )
|
||||||
|
Reference in New Issue
Block a user