Fix segfault in WidgetListBox

Fixes #1195