Fix crash with edit field on tab control at closing