Merge "optimizing: Fix a potential nullptr dereference" am: 3b101e4bf1
am: 4e203e8907

Change-Id: I3721ed278c4dd345315c0cfdda76de004ff6561f