Fix NPE.

Change-Id: Ic64ca7923dab8acae194e310480bade52b93f815
Merge branch 'cm-10.1' into martincz