From f7e792c71968db955494d8e5205fc067b599e67a Mon Sep 17 00:00:00 2001 From: James Crow Date: Thu, 14 May 2020 18:17:39 -0500 Subject: [PATCH] Add second check for position values (iOS) Optional position value is NSNull in arguments array when not included. --- src/ios/FileOpener2.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ios/FileOpener2.m b/src/ios/FileOpener2.m index 3bc1add..45c4536 100644 --- a/src/ios/FileOpener2.m +++ b/src/ios/FileOpener2.m @@ -83,7 +83,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //Opens the file preview CGRect rect; - if ([command.arguments count] >= 4) { + if ([command.arguments count] >= 4 + && ![[command.arguments objectAtIndex:3] isEqual: [NSNull null]]) { NSArray *positionValues = [command.arguments objectAtIndex:3]; rect = CGRectMake(0, 0, [[positionValues objectAtIndex:0] floatValue], [[positionValues objectAtIndex:1] floatValue]); } else {