Changeset 5367


Ignore:
Timestamp:
Oct 17, 2010 12:39:13 PM (4 years ago)
Author:
tboeckel
Message:
  • mui/MainFolderListtree.c: the dynamically allocated display hook must be freed after the object itself has been disposed. It seems NListtree.mcc is using the hook while being disposed. This closes #226.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r5366 r5367  
    55$Id$ 
    66$URL$ 
     7 
     82010-10-17 Thore Böckelmann <tboeckel@gmx.de> 
     9 
     10  * mui/MainFolderListtree.c: the dynamically allocated display hook must be 
     11    freed after the object itself has been disposed. It seems NListtree.mcc is 
     12    using the hook while being disposed. This closes #226. 
    713 
    8142010-10-14 Thore Böckelmann <tboeckel@gmx.de> 
  • trunk/src/mui/MainFolderListtree.c

    r5363 r5367  
    328328OVERLOAD(OM_DISPOSE) 
    329329{ 
     330  IPTR result; 
    330331  GETDATA; 
    331332  ULONG i; 
     333  struct Hook *displayHook = data->displayHook; 
    332334 
    333335  // make sure that our context menus are also disposed 
     
    345347  } 
    346348 
    347   if(data->displayHook != NULL) 
    348     FreeSysObject(ASOT_HOOK, data->displayHook); 
    349  
    350   return DoSuperMethodA(cl,obj,msg); 
     349  // dispose ourself first 
     350  result = DoSuperMethodA(cl, obj, msg); 
     351 
     352  // then finally dispose the hook 
     353  if(displayHook != NULL) 
     354    FreeSysObject(ASOT_HOOK, displayHook); 
     355 
     356  return result; 
    351357} 
    352358 
Note: See TracChangeset for help on using the changeset viewer.