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 <email@example.com>
Commit-Queue: Leon Scroggins <firstname.lastname@example.org>
4 files changed