search: Fix crash when selecting fodler with a File dialog

Felipe Borges requested to merge fix-crash-on-select-folder-locations-dialog into main

Merge request reports