Skip to content

Commit

Permalink
Merge pull request #498 from Yalantis/bugfix/aspect_ratio_crash
Browse files Browse the repository at this point in the history
Fixed crash in UCrop.getOutputCropAspectRatio(data)
  • Loading branch information
ukevgen authored Apr 1, 2019
2 parents 336127e + 239190c commit c39dcd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ucrop/src/main/java/com/yalantis/ucrop/UCrop.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public static int getOutputImageHeight(@NonNull Intent intent) {
* @return aspect ratio as a floating point value (x:y) - so it will be 1 for 1:1 or 4/3 for 4:3
*/
public static float getOutputCropAspectRatio(@NonNull Intent intent) {
return intent.getParcelableExtra(EXTRA_OUTPUT_CROP_ASPECT_RATIO);
return intent.getFloatExtra(EXTRA_OUTPUT_CROP_ASPECT_RATIO, 0f);
}

/**
Expand Down

0 comments on commit c39dcd4

Please sign in to comment.