mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2025-02-17 17:01:12 -05:00
Prevent crash bug edge case with sharing by email. Resolves GH-500
This commit is contained in:
parent
3dc7e638ae
commit
56ee7f8b7c
1 changed files with 3 additions and 0 deletions
|
@ -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];
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue