X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b93aafaba964d2ffb70c4afd21689e0cc9e877cd..7db0d5feb871090f9e053eabd8da79cfdb49d90e:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 47fc186875..0c7b85e417 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2751,9 +2751,13 @@ void wxGridRowOrColAttrData::SetAttr(wxGridCellAttr *attr, int rowOrCol) int i = m_rowsOrCols.Index(rowOrCol); if ( i == wxNOT_FOUND ) { - // add the attribute - m_rowsOrCols.Add(rowOrCol); - m_attrs.Add(attr); + if ( attr ) + { + // add the attribute + m_rowsOrCols.Add(rowOrCol); + m_attrs.Add(attr); + } + // nothing to remove } else {