Fix crash on null location list

Fix crash when the list of locations received from the webservice
is null.