Restore pattern creation, and do sanity checks before destroying the pattern or the surface. Closes #11140.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2009-08-24 22:49:27 +00:00
parent a6cf6bcfb4
commit 66f917a7ea

View File

@@ -1084,12 +1084,17 @@ wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitm
p.OffsetY(pixData, 1);
}
}
m_pattern = cairo_pattern_create_for_surface(m_surface);
}
wxCairoBitmapData::~wxCairoBitmapData()
{
cairo_pattern_destroy(m_pattern);
cairo_surface_destroy(m_surface);
if (m_pattern)
cairo_pattern_destroy(m_pattern);
if (m_surface)
cairo_surface_destroy(m_surface);
delete [] m_buffer;
}