Add null check to avoid exception.

Code was already added for b/28614514; moving it to check a little
earlier. Also adding another null pointer check.

This takes care of b/28842442 too.

Bug: 28883656
Change-Id: Ib8e29a7cc18bffa45a361c27a640fef791d6cafa
2 files changed
tree: c4e40b568483b1758a986a94e18c56c81edff12d
  1. src/
  2. tests/
  3. tools/
  4. Android.mk
  5. CleanSpec.mk
  6. README.txt