Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复图片src为空是引起characterAtIndex下标Range or index out of bounds #75

Merged
merged 1 commit into from Dec 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion IKit/IResourceMananger.m
Expand Up @@ -179,7 +179,7 @@ - (UIImage *)loadImageSrc:(NSString *)src callback:(void (^)(UIImage *))callback
if(callback){
callback(img);
}
}else{
}else if(![src isEqual:@""]){
if([src characterAtIndex:0] != '/'){
img = [UIImage imageNamed:src]; // imageNamed 内部有 cache
}else if([src rangeOfString:[NSBundle mainBundle].resourcePath].length > 0){
Expand Down