WhisperSystems/TextSecure — pull request #1262 by McLoo (2014-03-28 14:58:28+00:00)
Title: fix for #792 (crash on attaching image)

createScaledBitmap returns the source image if height and width of the scaled image are identical to source.
So it's not a good idea to recycle the source...

I'm not 100% sure if reassigning roughThumbnail is unproblematic.
Alternative would be to check if scaledThumbnail != roughThumbnail before recycle.

(my first try on a pull request - hope everything is correct)