X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04988ec423394b7f9464bb360f851b9d99617f48..fcb29b233888f7012ca6cf486c8287f5463787e0:/src/msw/radiobox.cpp diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index c8f410dc26..45424eb27e 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -505,6 +505,13 @@ wxSize wxRadioBox::GetTotalButtonSize(const wxSize& sizeBtn) const wxSize wxRadioBox::DoGetBestSize() const { + if ( !m_radioButtons ) + { + // if we're not fully initialized yet, we can't meaningfully compute + // our best size, we'll do it later + return wxSize(1, 1); + } + wxSize best = GetTotalButtonSize(GetMaxButtonSize()); CacheBestSize(best); return best;