Avoid debug warnings from wxPropertyGridManager::Create()

Skip calling Init2(), which assumes that the window has been
successfully created, if base class Create() failed.

See #26433.
This commit is contained in:
Vadim Zeitlin
2026-05-09 22:08:48 +02:00
parent bcb7177522
commit 0b380e6f4f
+6 -4
View File
@@ -628,16 +628,18 @@ bool wxPropertyGridManager::Create( wxWindow *parent,
if ( !m_pPropGrid )
m_pPropGrid = CreatePropertyGrid();
bool res = wxPanel::Create( parent, id, pos, size,
(style & wxWINDOW_STYLE_MASK)|wxWANTS_CHARS,
name );
if ( !wxPanel::Create( parent, id, pos, size,
(style & wxWINDOW_STYLE_MASK)|wxWANTS_CHARS,
name ) )
return false;
Init2(style);
SetInitialSize(size);
// Create controls
RecreateControls();
return res;
return true;
}
// -----------------------------------------------------------------------