124392: Avoid crash on close after assigning style.