diff --git a/submodules/lottie-ios/lottie-ios/Classes/Private/LOTComposition.m b/submodules/lottie-ios/lottie-ios/Classes/Private/LOTComposition.m index e84d117431..39ffd09b05 100644 --- a/submodules/lottie-ios/lottie-ios/Classes/Private/LOTComposition.m +++ b/submodules/lottie-ios/lottie-ios/Classes/Private/LOTComposition.m @@ -63,7 +63,7 @@ NSData *jsonData = [[NSData alloc] initWithContentsOfFile:filePath]; NSDictionary *JSONObject = jsonData ? [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error] : nil; - if (JSONObject && !error) { + if (JSONObject && [JSONObject isKindOfClass:[NSDictionary class]] && !error) { LOTComposition *laScene = [[self alloc] initWithJSON:JSONObject withAssetBundle:[NSBundle mainBundle]]; laScene.rootDirectory = [filePath stringByDeletingLastPathComponent]; [[LOTAnimationCache sharedCache] addAnimation:laScene forKey:animationName];