diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 1e8ccc94aa..45cbb86002 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -2041,7 +2041,7 @@ public: wxPGProperty* GetMainParent() const { - wxASSERT(m_property); + wxCHECK_MSG(m_property, NULL, "Property cannot be NULL"); return m_property->GetMainParent(); } diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index b784410902..6befa57fa7 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -5618,7 +5618,7 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild ) // Handles key event when editor control is not focused. // - wxCHECK2(!IsFrozen(), return); + wxCHECK_RET(!IsFrozen(), "wxPropertyGrid shouldn't be frozen"); // Traversal between items, collapsing/expanding, etc. wxPGProperty* selected = GetSelection();