Fix uncaught exception when no location provider available

Change-Id: I2625e6d219401a04a372a487d84edaaf3099f0d6