mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 23:47:39 +01:00
fix memory leak in editor summary.
This commit is contained in:
parent
a735e1715f
commit
9e8fe5e107
1 changed files with 3 additions and 0 deletions
|
|
@ -104,6 +104,9 @@ EditorSummary::render_background_image ()
|
|||
{
|
||||
int stride;
|
||||
unsigned char *data;
|
||||
if (_image) {
|
||||
free (cairo_image_surface_get_data (_image));
|
||||
}
|
||||
stride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, get_width ());
|
||||
data = (unsigned char*) malloc (stride * get_height ());
|
||||
_image = cairo_image_surface_create_for_data (data, CAIRO_FORMAT_RGB24, get_width (), get_height (), stride);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue