mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 15:40:59 +01:00
Prevent crash
This commit is contained in:
@@ -586,7 +586,7 @@ public class Helper {
|
||||
options.inSampleSize = factor;
|
||||
Bitmap scaled = BitmapFactory.decodeFile(file.getAbsolutePath(), options);
|
||||
|
||||
if (rotation != null) {
|
||||
if (scaled != null && rotation != null) {
|
||||
Bitmap rotated = Bitmap.createBitmap(scaled, 0, 0, scaled.getWidth(), scaled.getHeight(), rotation, true);
|
||||
scaled.recycle();
|
||||
scaled = rotated;
|
||||
|
||||
Reference in New Issue
Block a user