Pens need releasing before freeing layers to avoid invalid pointer access

This commit is contained in:
Chris Young 2016-02-14 14:01:53 +00:00
parent 672119e509
commit 71cdc461a6
1 changed files with 1 additions and 1 deletions

View File

@ -886,8 +886,8 @@ void ami_tree_close(struct treeview_window *twin)
twin->win = NULL;
DisposeObject(twin->objects[OID_MAIN]);
DelObjectNoFree(twin->node);
ami_free_layers(&twin->globals);
ami_plot_release_pens(twin->shared_pens);
ami_free_layers(&twin->globals);
FreeVec(twin->shared_pens);
for(i=0;i<AMI_TREE_MENU_ITEMS;i++) {