fix: fix for crash on putImageSize due to photoDescriptor being null. (#240)

fixes #226 #239
This commit is contained in:
gavan 2020-09-29 19:52:33 +08:00 committed by GitHub
parent c99c28c9a4
commit b6038a7f0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -709,7 +709,6 @@ public class CameraRollModule extends ReactContextBaseJavaModule {
width = options.outWidth;
height = options.outHeight;
}
}
try {
photoDescriptor.close();
@ -718,6 +717,8 @@ public class CameraRollModule extends ReactContextBaseJavaModule {
}
}
}
image.putInt("width", width);
image.putInt("height", height);
return success;