From 79d3444ac59619c0203e08e1d0b16991251011ab Mon Sep 17 00:00:00 2001 From: jayyaj12 Date: Fri, 9 Jan 2026 11:12:50 +0900 Subject: [PATCH 1/2] Fix NPE in DrawableTransformation when custom transform returns null --- .../glide/load/resource/bitmap/DrawableTransformation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/bumptech/glide/load/resource/bitmap/DrawableTransformation.java b/library/src/main/java/com/bumptech/glide/load/resource/bitmap/DrawableTransformation.java index eeb98ded2c..56327c321d 100644 --- a/library/src/main/java/com/bumptech/glide/load/resource/bitmap/DrawableTransformation.java +++ b/library/src/main/java/com/bumptech/glide/load/resource/bitmap/DrawableTransformation.java @@ -60,7 +60,7 @@ public Resource transform( Resource transformedBitmapResource = wrapped.transform(context, bitmapResourceToTransform, outWidth, outHeight); - if (transformedBitmapResource.equals(bitmapResourceToTransform)) { + if (bitmapResourceToTransform.equals(transformedBitmapResource)) { transformedBitmapResource.recycle(); return resource; } else { From da3134c581c12c018f803ab5af677179c19c8104 Mon Sep 17 00:00:00 2001 From: jayyaj12 Date: Fri, 9 Jan 2026 11:21:58 +0900 Subject: [PATCH 2/2] Fix NPE in DrawableTransformation when custom transform returns null --- .../glide/load/resource/bitmap/DrawableTransformation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/bumptech/glide/load/resource/bitmap/DrawableTransformation.java b/library/src/main/java/com/bumptech/glide/load/resource/bitmap/DrawableTransformation.java index eeb98ded2c..56327c321d 100644 --- a/library/src/main/java/com/bumptech/glide/load/resource/bitmap/DrawableTransformation.java +++ b/library/src/main/java/com/bumptech/glide/load/resource/bitmap/DrawableTransformation.java @@ -60,7 +60,7 @@ public Resource transform( Resource transformedBitmapResource = wrapped.transform(context, bitmapResourceToTransform, outWidth, outHeight); - if (transformedBitmapResource.equals(bitmapResourceToTransform)) { + if (bitmapResourceToTransform.equals(transformedBitmapResource)) { transformedBitmapResource.recycle(); return resource; } else {