From 23039ca6323773bbf78f4ff12866baede1e3a659 Mon Sep 17 00:00:00 2001 From: deadwood Date: Tue, 26 Jan 2016 19:21:41 +0000 Subject: [PATCH] Listtree.mcc: use local pointer as instance data gets destroyed in Object DISPOSE git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@51429 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- workbench/classes/zune/listtree/listtree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workbench/classes/zune/listtree/listtree.c b/workbench/classes/zune/listtree/listtree.c index 766a7b5318..d996323edc 100644 --- a/workbench/classes/zune/listtree/listtree.c +++ b/workbench/classes/zune/listtree/listtree.c @@ -317,10 +317,12 @@ IPTR Listtree__OM_DISPOSE(struct IClass *cl, Object *obj, Msg msg) { struct Listtree_DATA *data = INST_DATA(cl, obj); + APTR pool = data->pool; IPTR result = DoSuperMethodA(cl, obj, msg); - /* Destruct hook called by dispose on NListree will need the pool */ - DeletePool(data->pool); + /* Destruct hook called by dispose on NListree will need the pool, + * so destroy it only after super dispose is called */ + DeletePool(pool); return result; } -- 2.11.4.GIT