Fixed potential bug in not recycling bitmaps that I spied from BS+

git-svn-id: https://zxing.googlecode.com/svn/trunk@2004 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2011-11-02 11:31:10 +00:00
parent b972ba85ac
commit ce014a5ffc

View file

@ -155,7 +155,11 @@ public final class ViewfinderView extends View {
}
public void drawViewfinder() {
resultBitmap = null;
Bitmap resultBitmap = this.resultBitmap;
this.resultBitmap = null;
if (resultBitmap != null) {
resultBitmap.recycle();
}
invalidate();
}