mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
9e6f52f47b
commit
4bb5c4f35e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue