search: Fix crash on clicking 'Search Locations'

When creating a Page, the dialog variable wasn't set and thus
dereferencing a NULL in a later code resulting a crash.

This was introduced in 14b9f65ba4


(cherry picked from commit 2fb0ff250b)
This commit is contained in:
Mohammed Sadiq 2019-09-19 17:15:23 +00:00 committed by Georges Basile Stavracas Neto
parent e369c8c197
commit 0b6697934b

View file

@ -261,6 +261,7 @@ get_tracker_locations (CcSearchLocationsDialog *self)
path = path_from_tracker_dir (locations[idx]);
location = g_slice_new0 (Place);
location->dialog = self;
location->location = g_file_new_for_commandline_arg (path);
location->display_name = g_file_get_basename (location->location);
location->place_type = PLACE_OTHER;