Changed loop of UseOnlyGPS function

When mLocation is not null loop will stop.