mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 15:54:41 +00:00
Fixed a memory leak.
This commit is contained in:
parent
7e5afec3d9
commit
58bafbb080
@ -63,10 +63,11 @@ static void cmd_screen_shot_execute(const char *argument)
|
|||||||
Sprite *sprite = sprite_new_with_layer(imgtype, bmp->w, bmp->h);
|
Sprite *sprite = sprite_new_with_layer(imgtype, bmp->w, bmp->h);
|
||||||
Image *image = GetImage2(sprite, NULL, NULL, NULL);
|
Image *image = GetImage2(sprite, NULL, NULL, NULL);
|
||||||
int x, y, r, g, b;
|
int x, y, r, g, b;
|
||||||
Palette *pal = palette_new(0, MAX_PALETTE_COLORS);
|
|
||||||
|
|
||||||
|
Palette *pal = palette_new(0, MAX_PALETTE_COLORS);
|
||||||
palette_from_allegro(pal, rgbpal);
|
palette_from_allegro(pal, rgbpal);
|
||||||
sprite_set_palette(sprite, pal, TRUE);
|
sprite_set_palette(sprite, pal, TRUE);
|
||||||
|
palette_free(pal);
|
||||||
|
|
||||||
/* convert Allegro "BITMAP" to ASE "Image" */
|
/* convert Allegro "BITMAP" to ASE "Image" */
|
||||||
if (imgtype == IMAGE_RGB) {
|
if (imgtype == IMAGE_RGB) {
|
||||||
|
Loading…
Reference in New Issue
Block a user