Pens need releasing before freeing layers to avoid invalid pointer access
This commit is contained in:
parent
672119e509
commit
71cdc461a6
|
@ -886,8 +886,8 @@ void ami_tree_close(struct treeview_window *twin)
|
||||||
twin->win = NULL;
|
twin->win = NULL;
|
||||||
DisposeObject(twin->objects[OID_MAIN]);
|
DisposeObject(twin->objects[OID_MAIN]);
|
||||||
DelObjectNoFree(twin->node);
|
DelObjectNoFree(twin->node);
|
||||||
ami_free_layers(&twin->globals);
|
|
||||||
ami_plot_release_pens(twin->shared_pens);
|
ami_plot_release_pens(twin->shared_pens);
|
||||||
|
ami_free_layers(&twin->globals);
|
||||||
FreeVec(twin->shared_pens);
|
FreeVec(twin->shared_pens);
|
||||||
|
|
||||||
for(i=0;i<AMI_TREE_MENU_ITEMS;i++) {
|
for(i=0;i<AMI_TREE_MENU_ITEMS;i++) {
|
||||||
|
|
Loading…
Reference in New Issue