Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Fix NPE while making the screenshot bitmap mutable
Browse files Browse the repository at this point in the history
  • Loading branch information
nkming2 committed Oct 30, 2018
1 parent 048f819 commit 253882f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ public static void startCalibration(@NonNull Context context,
sCalibrationImage = bitmap;
} else {
// Make a mutable copy of the bitmap so we can draw on it with a Canvas
sCalibrationImage = bitmap.copy(sCalibrationImage.getConfig() ,true);
sCalibrationImage = bitmap.copy(
(bitmap.getConfig() != null) ? bitmap.getConfig() : Bitmap.Config.ARGB_8888 ,true);
}

if (!sCalibrationImage.isMutable()) {
Expand Down

0 comments on commit 253882f

Please sign in to comment.