Don't destroy layers if we never created them.

This commit is contained in:
Chris Young 2017-12-23 14:17:24 +00:00
parent 6e5344464b
commit fdaad39a57

View File

@ -239,6 +239,8 @@ void ami_plot_ra_free(struct gui_globals *gg)
{
init_layers_count--;
if(init_layers_count < 0) return;
if((init_layers_count == 0) && (pool_pens != NULL)) {
ami_memory_itempool_delete(pool_pens);
pool_pens = NULL;