ColorPalette: Fix Dispose function
* Set freed pointer to NULL in dispose function because dispose cna be run multiple times. This fixes the case of freeing an already freed pointer.
This commit is contained in:
parent
f135b42d8a
commit
f6abfada2c
@ -238,6 +238,7 @@ static void color_palette_dispose(GObject *gobj)
|
|||||||
if (palette->color_array) {
|
if (palette->color_array) {
|
||||||
palette->color_array_length = 0;
|
palette->color_array_length = 0;
|
||||||
free(palette->color_array);
|
free(palette->color_array);
|
||||||
|
palette->color_array = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chain up to parent class */
|
/* Chain up to parent class */
|
||||||
|
Loading…
Reference in New Issue
Block a user