Merge "Protect callbacks from NullPointerException" into main