Merge "Guard against crash due to null surface" into pi-dev am: 13c2b9b5b6
am: 6ce9608907

Change-Id: I3780c6aac9e33477d8b7241d8cba99e8df748953