Fix double delete in SkBmpCodec
Previously, if ReadHeader returned false, it deleted the input stream.
But there are a couple of cases where ReadHeader creates an SkCodec and
then returns false. The SkCodec deletes the stream, and then so does
Make sure that we do not double delete by only deleting if no SkCodec
Add a test, so such a double delete will be caught by the bots.
Reviewed-by: Derek Sollenberger <firstname.lastname@example.org>
Commit-Queue: Leon Scroggins <email@example.com>
1 file changed