am 545f1bf8: Guard against null pointer if a tream to a Uri cannot be opened.

* commit '545f1bf8b47c12d2453143706a2fd76d9eef2368':
  Guard against null pointer if a tream to a Uri cannot be opened.