Always initialize just added wxRibbonButtonBar field
Initialize m_ribbonBar added in the previous commit to NULL before setting it to the correct value later, when wxRibbonButtonBar is fully created. See #19249. Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
This commit is contained in:
@@ -973,8 +973,10 @@ void wxRibbonButtonBar::OnSize(wxSizeEvent& evt)
|
|||||||
|
|
||||||
void wxRibbonButtonBar::CommonInit(long WXUNUSED(style))
|
void wxRibbonButtonBar::CommonInit(long WXUNUSED(style))
|
||||||
{
|
{
|
||||||
if ( m_parent )
|
// This can initialize it to NULL when we're called from the default ctor,
|
||||||
m_ribbonBar = GetAncestorRibbonBar();
|
// but will set it to the correct value when used from non-default ctor or
|
||||||
|
// Create() later.
|
||||||
|
m_ribbonBar = GetAncestorRibbonBar();
|
||||||
|
|
||||||
m_bitmap_size_large = wxSize(32, 32);
|
m_bitmap_size_large = wxSize(32, 32);
|
||||||
m_bitmap_size_small = wxSize(16, 16);
|
m_bitmap_size_small = wxSize(16, 16);
|
||||||
|
Reference in New Issue
Block a user