Ensure we have a layer before deleting it.

This commit is contained in:
Chris Young 2017-12-23 14:14:20 +00:00
parent 3c0ff81be4
commit 6e5344464b

View File

@ -245,7 +245,7 @@ void ami_plot_ra_free(struct gui_globals *gg)
}
if(gg->rp) {
DeleteLayer(0,gg->rp->Layer);
if(gg->rp->Layer != NULL) DeleteLayer(0, gg->rp->Layer);
free(gg->rp->TmpRas);
free(gg->rp->AreaInfo);
free(gg->rp);