mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 02:17:43 +03:00
Merge pull request #2622 from nextcloud/preview-bitmap-npe
ui:preview Verify that bitmap is not null before setting imageDrawable.
This commit is contained in:
commit
27b503d2cd
1 changed files with 3 additions and 5 deletions
|
@ -610,11 +610,9 @@ public class PreviewImageFragment extends FileFragment {
|
|||
final PhotoView imageView = mImageViewRef.get();
|
||||
Bitmap bitmap = result.bitmap;
|
||||
|
||||
if (imageView != null) {
|
||||
if (bitmap != null) {
|
||||
Log_OC.d(TAG, "Showing image with resolution " + bitmap.getWidth() + "x" +
|
||||
bitmap.getHeight());
|
||||
}
|
||||
if (imageView != null && bitmap != null) {
|
||||
Log_OC.d(TAG, "Showing image with resolution " + bitmap.getWidth() + "x" +
|
||||
bitmap.getHeight());
|
||||
|
||||
if (result.ocFile.getMimetype().equalsIgnoreCase(MIME_TYPE_PNG) ||
|
||||
result.ocFile.getMimetype().equalsIgnoreCase(MIME_TYPE_SVG) ||
|
||||
|
|
Loading…
Reference in a new issue