mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 21:53:43 +00:00
check if image decoding succeeded before using the result
Fixes #6061 Closes #6080 // FREEBIE
This commit is contained in:
parent
21a0fe3a48
commit
4461ebf662
@ -59,6 +59,10 @@ public class BitmapUtil {
|
|||||||
constraints.getImageMaxHeight(context),
|
constraints.getImageMaxHeight(context),
|
||||||
DecodeFormat.PREFER_RGB_565);
|
DecodeFormat.PREFER_RGB_565);
|
||||||
|
|
||||||
|
if (scaledBitmap == null) {
|
||||||
|
throw new BitmapDecodingException("Unable to decode image");
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
do {
|
do {
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user