Fix segfault in WidgetListBox

Fixes #1195
Merge pull request #1196 from dorkster/fixes

Fix segfault in WidgetListBox