Fix crash when clicking on a gif image

For gif images, the dimensions is always null.

Closes #6021
//FREEBIE
This commit is contained in:
AsamK 2017-01-07 16:39:19 +01:00 committed by Moxie Marlinspike
parent f310dd6047
commit 7817e38e5f

View File

@ -86,7 +86,7 @@ public class ZoomingImageView extends FrameLayout {
} }
protected void onPostExecute(@Nullable Pair<Integer, Integer> dimensions) { protected void onPostExecute(@Nullable Pair<Integer, Integer> dimensions) {
Log.w(TAG, "Dimensions: " + dimensions.first + ", " + dimensions.second); Log.w(TAG, "Dimensions: " + (dimensions == null ? "(null)" : dimensions.first + ", " + dimensions.second));
if (dimensions == null || (dimensions.first <= maxTextureSize && dimensions.second <= maxTextureSize)) { if (dimensions == null || (dimensions.first <= maxTextureSize && dimensions.second <= maxTextureSize)) {
Log.w(TAG, "Loading in standard image view..."); Log.w(TAG, "Loading in standard image view...");