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: 6d2a33f2a645074b44d8aa7c5be1a79f69ba70de
  1. src/
  2. tests/
  3. tools/
  4. Android.mk
  5. CleanSpec.mk
  6. README.txt