Merge pull request #53 from thisandagain/bugfix/500

Prevent crash bug edge case with sharing by email. Resolves GH-500
This commit is contained in:
Andrew Sliwinski 2016-04-08 13:00:17 -04:00
commit 9f14b53853

View file

@ -342,6 +342,9 @@ JSContext *js;
mimeType = @"application/x-pbskids-scratchjr-project";
#endif
// Check to ensure modal is not nil. This can occur when the user does not have a mail account configured on their device
if (mailComposeViewController == nil) return;
[mailComposeViewController addAttachmentData:projectData mimeType:mimeType fileName:filename];
[self presentViewController:mailComposeViewController animated:YES completion:nil];
});