Fixed use-after-free error when setting toolbar font