Fix InvalidProtoWireException

The NPE here would catch in the outer try-catch causing the end object
token to not be written by ProtoOutputStream

Bug: 187098431
Test: atest IncidentdTest#testIncidentReportDumpLocal
Change-Id: I65fb92c077e246aaf2ae902b545fea38dd667e25
1 file changed