Prevent crash

pull/161/head
M66B 6 years ago
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…
Cancel
Save