You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/03/22 02:00:06 UTC
[33/50] incubator-weex git commit: * [ios] handle error when register
graphic font
* [ios] handle error when register graphic font
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/82576803
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/82576803
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/82576803
Branch: refs/heads/0.12-dev
Commit: 8257680344f210913c59a003e7669804df820090
Parents: ece390f
Author: acton393 <zh...@gmail.com>
Authored: Sat Mar 18 00:58:23 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Sat Mar 18 00:58:23 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Utility/WXUtility.m | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/82576803/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
index 2289646..6668e9d 100644
--- a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
+++ b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m
@@ -348,8 +348,8 @@ static BOOL WXNotStat;
if (error) {
CFRelease(error);
error = nil;
- CTFontManagerUnregisterFontsForURL(fontURL, kCTFontManagerScopeProcess, &error);
- CTFontManagerRegisterFontsForURL(fontURL, kCTFontManagerScopeProcess, &error);
+ CTFontManagerUnregisterFontsForURL(fontURL, kCTFontManagerScopeProcess, NULL);
+ CTFontManagerRegisterFontsForURL(fontURL, kCTFontManagerScopeProcess, NULL);
}
NSArray *descriptors = (__bridge_transfer NSArray *)CTFontManagerCreateFontDescriptorsFromURL(fontURL);
// length of descriptors here will be only one.
@@ -357,9 +357,6 @@ static BOOL WXNotStat;
font = [UIFont fontWithDescriptor:desc size:fontSize];
}
CFRelease(fontURL);
- if (error) {
- CFRelease(error);
- }
}
}else {