Commit mem leak fix I introduced
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2952,6 +2952,13 @@ int wxDataViewMainWindow::GetLineStart( unsigned int row ) const
|
|||||||
|
|
||||||
wxDataViewItem item = node->GetItem();
|
wxDataViewItem item = node->GetItem();
|
||||||
|
|
||||||
|
if (node && !node->HasChildren())
|
||||||
|
{
|
||||||
|
// Yes, if the node does not have any child, it must be a leaf which
|
||||||
|
// mean that it is a temporarily created by GetTreeNodeByRow
|
||||||
|
wxDELETE(node)
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int cols = GetOwner()->GetColumnCount();
|
unsigned int cols = GetOwner()->GetColumnCount();
|
||||||
unsigned int col;
|
unsigned int col;
|
||||||
int height = m_lineHeight;
|
int height = m_lineHeight;
|
||||||
@@ -2972,6 +2979,7 @@ int wxDataViewMainWindow::GetLineStart( unsigned int row ) const
|
|||||||
height = wxMax( height, renderer->GetSize().y );
|
height = wxMax( height, renderer->GetSize().y );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
start += height;
|
start += height;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3004,6 +3012,13 @@ int wxDataViewMainWindow::GetLineAt( unsigned int y ) const
|
|||||||
|
|
||||||
wxDataViewItem item = node->GetItem();
|
wxDataViewItem item = node->GetItem();
|
||||||
|
|
||||||
|
if (node && !node->HasChildren())
|
||||||
|
{
|
||||||
|
// Yes, if the node does not have any child, it must be a leaf which
|
||||||
|
// mean that it is a temporarily created by GetTreeNodeByRow
|
||||||
|
wxDELETE(node)
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int cols = GetOwner()->GetColumnCount();
|
unsigned int cols = GetOwner()->GetColumnCount();
|
||||||
unsigned int col;
|
unsigned int col;
|
||||||
int height = m_lineHeight;
|
int height = m_lineHeight;
|
||||||
@@ -3053,6 +3068,13 @@ int wxDataViewMainWindow::GetLineHeight( unsigned int row ) const
|
|||||||
|
|
||||||
wxDataViewItem item = node->GetItem();
|
wxDataViewItem item = node->GetItem();
|
||||||
|
|
||||||
|
if (node && !node->HasChildren())
|
||||||
|
{
|
||||||
|
// Yes, if the node does not have any child, it must be a leaf which
|
||||||
|
// mean that it is a temporarily created by GetTreeNodeByRow
|
||||||
|
wxDELETE(node)
|
||||||
|
}
|
||||||
|
|
||||||
int height = m_lineHeight;
|
int height = m_lineHeight;
|
||||||
|
|
||||||
unsigned int cols = GetOwner()->GetColumnCount();
|
unsigned int cols = GetOwner()->GetColumnCount();
|
||||||
|
Reference in New Issue
Block a user