Fix for probably rare but potential refcount leak.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2592,7 +2592,7 @@ wxGridCellAttr *wxGridCellAttrProvider::GetAttr(int row, int col,
|
|||||||
wxGridCellAttr *attrcol = m_data->m_colAttrs.GetAttr(col);
|
wxGridCellAttr *attrcol = m_data->m_colAttrs.GetAttr(col);
|
||||||
|
|
||||||
if((attrcell != attrrow) && (attrrow != attrcol) && (attrcell != attrcol)){
|
if((attrcell != attrrow) && (attrrow != attrcol) && (attrcell != attrcol)){
|
||||||
// Two or move are non NULL
|
// Two or more are non NULL
|
||||||
attr = new wxGridCellAttr;
|
attr = new wxGridCellAttr;
|
||||||
attr->SetKind(wxGridCellAttr::Merged);
|
attr->SetKind(wxGridCellAttr::Merged);
|
||||||
|
|
||||||
@@ -2617,8 +2617,18 @@ wxGridCellAttr *wxGridCellAttrProvider::GetAttr(int row, int col,
|
|||||||
{
|
{
|
||||||
// one or none is non null return it or null.
|
// one or none is non null return it or null.
|
||||||
if(attrrow) attr = attrrow;
|
if(attrrow) attr = attrrow;
|
||||||
if(attrcol) attr = attrcol;
|
if(attrcol)
|
||||||
if(attrcell) attr = attrcell;
|
{
|
||||||
|
if(attr)
|
||||||
|
attr->DecRef();
|
||||||
|
attr = attrcol;
|
||||||
|
}
|
||||||
|
if(attrcell)
|
||||||
|
{
|
||||||
|
if(attr)
|
||||||
|
attr->DecRef();
|
||||||
|
attr = attrcell;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -3815,7 +3825,7 @@ wxEND_HANDLERS_TABLE()
|
|||||||
wxCONSTRUCTOR_5( wxGrid , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
wxCONSTRUCTOR_5( wxGrid , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
TODO : Expose more information of a list's layout etc. via appropriate objects (<28> la NotebookPageInfo)
|
TODO : Expose more information of a list's layout etc. via appropriate objects (<28><EFBFBD> la NotebookPageInfo)
|
||||||
*/
|
*/
|
||||||
#else
|
#else
|
||||||
IMPLEMENT_DYNAMIC_CLASS( wxGrid, wxScrolledWindow )
|
IMPLEMENT_DYNAMIC_CLASS( wxGrid, wxScrolledWindow )
|
||||||
|
Reference in New Issue
Block a user