Add nullptr checks to wxGridTableBase::Set(Row|Col)Attr
wxGridTableBase::SetAttr (for cells) does check its attr parameter for nullptr, but the check was missing from the row and column functions. Adding it makes it possible to use a nullptr argument to reset the attributes.
This commit is contained in:
@@ -1055,6 +1055,7 @@ void wxGridTableBase::SetRowAttr(wxGridCellAttr *attr, int row)
|
||||
{
|
||||
if ( m_attrProvider )
|
||||
{
|
||||
if ( attr )
|
||||
attr->SetKind(wxGridCellAttr::Row);
|
||||
m_attrProvider->SetRowAttr(attr, row);
|
||||
}
|
||||
@@ -1070,6 +1071,7 @@ void wxGridTableBase::SetColAttr(wxGridCellAttr *attr, int col)
|
||||
{
|
||||
if ( m_attrProvider )
|
||||
{
|
||||
if ( attr )
|
||||
attr->SetKind(wxGridCellAttr::Col);
|
||||
m_attrProvider->SetColAttr(attr, col);
|
||||
}
|
||||
|
Reference in New Issue
Block a user