Attempt to fix crash in WidgetTooltip::render()

This should fix #1024

@igorko, please test.