diff --git a/ios/ScratchJr/src/IO.m b/ios/ScratchJr/src/IO.m index f5e1230..eb8c189 100644 --- a/ios/ScratchJr/src/IO.m +++ b/ios/ScratchJr/src/IO.m @@ -313,7 +313,10 @@ NSMutableDictionary *soundtimers; NSDictionary *page = [json valueForKey:name]; for (NSString *spriteName in [page valueForKey:@"sprites"]) { NSDictionary *sprite = [page valueForKey:spriteName]; - [sprites setValue:sprite forKey:[sprite valueForKey:@"md5"]]; + NSString *md5 = [sprite valueForKey:@"md5"]; + if (md5 != nil) { + [sprites setValue:sprite forKey:md5]; + } } }