(get_tooltip_location): Prevent crash when a tooltip is being prepared