Fix crash with NULL pointer dereferencing

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-10-10 07:36:36 +00:00
parent 2571a33fd3
commit d7cda9b290

View File

@@ -4154,7 +4154,7 @@ WXLRESULT wxDataViewCtrl::MSWWindowProc(WXUINT nMsg,
wxSize wxDataViewCtrl::GetSizeAvailableForScrollTarget(const wxSize& size)
{
wxSize newsize = size;
if (!HasFlag(wxDV_NO_HEADER))
if (!HasFlag(wxDV_NO_HEADER) && (m_headerArea))
newsize.y -= m_headerArea->GetSize().y;
return newsize;