Skip to content

Commit d993e8b

Browse files
committed
crash when viewing remote image
1 parent 88e24aa commit d993e8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/co/tinode/tindroid/ImageViewFragment.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ public void onSuccess(@NonNull Drawable drawable) {
313313
return;
314314
}
315315

316-
final Bitmap bmp = ((BitmapDrawable) mImageView.getDrawable()).getBitmap();
316+
final Bitmap bmp = ((BitmapDrawable) drawable).getBitmap();
317+
mImageView.setImageDrawable(drawable);
317318
mInitialRect = new RectF(0, 0, bmp.getWidth(), bmp.getHeight());
318319
mWorkingRect = new RectF(mInitialRect);
319320
mMatrix.setRectToRect(mInitialRect, mScreenRect, Matrix.ScaleToFit.CENTER);

0 commit comments

Comments
 (0)