From 7dd00efa64984f889712b2dcefda9ce3c9850daf Mon Sep 17 00:00:00 2001 From: Kanahia <114223204+kanahia1@users.noreply.github.com> Date: Sat, 30 Mar 2024 06:59:59 +0530 Subject: [PATCH] Fixes App crashes on clicking Save (EditActivity) (#5670) * Fixed Grey empty screen at Upload wizard caption step after denying files permission * Empty commit * Fixed loop issue * Created docs for earlier commits * Fixed javadoc * Fixed spaces * Added added basic features to OSM Maps * Added search location feature * Added filter to Open Street Maps * Fixed chipGroup in Open Street Maps * Removed mapBox code * Removed mapBox's code * Reformat code * Reformatted code * Removed rotation feature to map * Removed rotation files and Fixed Marker click problem * Ignored failing tests * Added voice input feature * Fixed test cases * Changed caption and description text * Replaced mapbox to osmdroid in upload activity * Fixed Unit Tests * Made selected marker to be fixed on map * Changed color of map marker * Fixes #5439 by capitalizing first letter of voice input * Removed mapbox code1 * Removed mapbox code2 * Fixed failing tests * Fixed failing due to merging * Added feature to save nearby places as GPX and KML * Fixed error caused by null * Improved UX for Nearby Export * Delete app/src/main/res/values-yue-hant directory * Fixed internationalization issue * Fixed crash --- app/src/main/java/fr/free/nrw/commons/edit/EditActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/edit/EditActivity.kt b/app/src/main/java/fr/free/nrw/commons/edit/EditActivity.kt index 273c83c31..a04e0c323 100644 --- a/app/src/main/java/fr/free/nrw/commons/edit/EditActivity.kt +++ b/app/src/main/java/fr/free/nrw/commons/edit/EditActivity.kt @@ -237,8 +237,11 @@ class EditActivity : AppCompatActivity() { if (rotatedImage == null) { Toast.makeText(this, "Failed to rotate to image", Toast.LENGTH_LONG).show() } - val editedImageExif = rotatedImage?.path?.let { ExifInterface(it) } - copyExifData(editedImageExif) + val editedImageExif: ExifInterface? + if (rotatedImage?.path != null) { + editedImageExif = ExifInterface(rotatedImage.path) + copyExifData(editedImageExif) + } val resultIntent = Intent() resultIntent.putExtra("editedImageFilePath", rotatedImage?.toUri()?.path ?: "Error"); setResult(RESULT_OK, resultIntent);