Prevent crash

This commit is contained in:
M66B 2019-08-18 08:56:11 +02:00
parent 9e6f52f47b
commit 4bb5c4f35e
1 changed files with 1 additions and 1 deletions

View File

@ -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;