Merge "Fix potential NULL dereference" am: ccf56a09ee am: 485046c66a
am: 473419175f

Change-Id: Ie2cab2e5ca4828c4fb6d8ae35a35ee34c0933ab3