Amiga: BitMap always alloced with the ami_rtg_ function, so should be freed with it too.

This commit is contained in:
Chris Young 2021-05-17 16:45:49 +01:00
parent 38fc60486b
commit a6e825833d

View File

@ -257,11 +257,7 @@ void ami_plot_ra_free(struct gui_globals *gg)
ami_memory_chip_free(gg->tmprasbuf); ami_memory_chip_free(gg->tmprasbuf);
free(gg->areabuf); free(gg->areabuf);
DisposeLayerInfo(gg->layerinfo); DisposeLayerInfo(gg->layerinfo);
if(gg->palette_mapped == false) { if(gg->bm) ami_rtg_freebitmap(gg->bm);
if(gg->bm) ami_rtg_freebitmap(gg->bm);
} else {
if(gg->bm) FreeBitMap(gg->bm);
}
if(gg->managed_pen_list == true) { if(gg->managed_pen_list == true) {
ami_plot_release_pens(gg->shared_pens); ami_plot_release_pens(gg->shared_pens);