diff --git a/lottie/src/main/java/com/airbnb/lottie/manager/ImageAssetManager.java b/lottie/src/main/java/com/airbnb/lottie/manager/ImageAssetManager.java index 0634357045..afda3b5304 100644 --- a/lottie/src/main/java/com/airbnb/lottie/manager/ImageAssetManager.java +++ b/lottie/src/main/java/com/airbnb/lottie/manager/ImageAssetManager.java @@ -118,7 +118,11 @@ public void setDelegate(@Nullable ImageAssetDelegate assetDelegate) { try { bitmap = BitmapFactory.decodeStream(is, null, opts); } catch (IllegalArgumentException e) { - Logger.warning("Unable to decode image.", e); + Logger.warning("Unable to decode image `" + id + "`.", e); + return null; + } + if (bitmap == null) { + Logger.warning("Decoded image `" + id + "` is null."); return null; } bitmap = Utils.resizeBitmapIfNeeded(bitmap, asset.getWidth(), asset.getHeight());