In order to prevent the panel code from using the type after it is freed, the field needs to be set to NULL. This needs to be done recursively for subpanels as well as top-level panels.
In order to prevent the panel code from using the type after it is freed, the field needs to be set to NULL. This needs to be done recursively for subpanels as well as top-level panels.