Handle the rare case where wxPropertyGrid::HandleCustomEditorEvent() may receive event before the grid state has been initialized.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3278,6 +3278,12 @@ bool wxPropertyGrid::DoEditorValidate()
|
|||||||
|
|
||||||
void wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event )
|
void wxPropertyGrid::HandleCustomEditorEvent( wxEvent &event )
|
||||||
{
|
{
|
||||||
|
// It is possible that this handler receives event even before
|
||||||
|
// the control has been properly initialized. Let's skip the
|
||||||
|
// event handling in that case.
|
||||||
|
if ( !m_pState )
|
||||||
|
return;
|
||||||
|
|
||||||
wxPGProperty* selected = GetSelection();
|
wxPGProperty* selected = GetSelection();
|
||||||
|
|
||||||
// Somehow, event is handled after property has been deselected.
|
// Somehow, event is handled after property has been deselected.
|
||||||
|
Reference in New Issue
Block a user