fix crash which happened if you called SetAttr(NULL) followed by SetAttr(attr) (#9567)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2590,8 +2590,12 @@ void wxGridCellAttrData::SetAttr(wxGridCellAttr *attr, int row, int col)
|
|||||||
int n = FindIndex(row, col);
|
int n = FindIndex(row, col);
|
||||||
if ( n == wxNOT_FOUND )
|
if ( n == wxNOT_FOUND )
|
||||||
{
|
{
|
||||||
// add the attribute
|
if ( attr )
|
||||||
m_attrs.Add(new wxGridCellWithAttr(row, col, attr));
|
{
|
||||||
|
// add the attribute
|
||||||
|
m_attrs.Add(new wxGridCellWithAttr(row, col, attr));
|
||||||
|
}
|
||||||
|
//else: nothing to do
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user