Skip to content

Commit

Permalink
iOS: Fix Crash when CameraRoll is getting assets from iCloud and no f…
Browse files Browse the repository at this point in the history
…ilename is provided. #13671

Summary:
RCTCameraRollManager.m crashes when there is no filename provided for the asset (usually from iCloud). #13671

Tested on real device with iCloud library using the library without and after my fix. It worked after my changes.

[IOS] [BUGFIX] [CameraRoll] - Changed the filename if nil to be empty when the asset is coming from iCloud.
Closes #17549

Differential Revision: D6710665

Pulled By: hramos

fbshipit-source-id: 319865b0a71728798c62ee380e7bee4af584b3e3
  • Loading branch information
pentarex authored and facebook-github-bot committed Jan 12, 2018
1 parent 2afe7d4 commit 2ae2436
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/CameraRoll/RCTCameraRollManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static void RCTResolvePromise(RCTPromiseResolveBlock resolve,
@"group_name": [group valueForProperty:ALAssetsGroupPropertyName],
@"image": @{
@"uri": uri,
@"filename" : filename,
@"filename" : filename ?: [NSNull null],
@"height": @(dimensions.height),
@"width": @(dimensions.width),
@"isStored": @YES,
Expand Down

0 comments on commit 2ae2436

Please sign in to comment.