In some situations, path could be null resulting
in a crash.
Test: no crash
Bug: 109730998
Change-Id: I2ce0410162d1327905d690331f461f9187e20906
Merged-In: I2ce0410162d1327905d690331f461f9187e20906
(cherry picked from commit 6f6154bf)
(cherry picked from commit 30f63cf1)