Fix NPE in layoutlib. [DO NOT MERGE]

Change-Id: I36623304d83b344ea078044001577b8005a63c02
(cherry-picked from d0581d271e814670d81a6550aa7b1e86864d5710)
1 file changed