Fix crash inside widget_needs_widget_path()

Crash found at least in Nautilus and Gnome-calendar:
https://bugzilla.redhat.com/buglist.cgi?quicksearch=widget_needs_widget_path

Fixes #2457
7 jobs for fix_crash_needs_widget_path in 20 minutes and 9 seconds (queued for 1 second)
latest