Skip to content

Commit 4b60ac9

Browse files
committed
Fix a possible crash
Fix a possible crash when ref is nil.
1 parent 8488492 commit 4b60ac9

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

LLDebugTool/Helper/AppHelper/LLAppHelper.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,13 @@ - (NSString *)currentWifiSSID
321321
{
322322
ssid = info[@"SSID"];
323323
}
324-
CFAutorelease(dictionaryRef);
324+
if (dictionaryRef) {
325+
CFAutorelease(dictionaryRef);
326+
}
327+
}
328+
if (ifRef) {
329+
CFAutorelease(ifRef);
325330
}
326-
CFAutorelease(ifRef);
327331
return ssid;
328332
}
329333

LLDebugToolDemo.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@
998998
INFOPLIST_FILE = LLDebugToolDemo/Info.plist;
999999
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
10001000
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1001-
PRODUCT_BUNDLE_IDENTIFIER = "myCompany.HDB-Li.LLDebugToolDemo";
1001+
PRODUCT_BUNDLE_IDENTIFIER = myCompany.HDB.LLDebugToolDemo;
10021002
PRODUCT_NAME = "$(TARGET_NAME)";
10031003
PROVISIONING_PROFILE_SPECIFIER = "";
10041004
TARGETED_DEVICE_FAMILY = "1,2";
@@ -1016,7 +1016,7 @@
10161016
INFOPLIST_FILE = LLDebugToolDemo/Info.plist;
10171017
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
10181018
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1019-
PRODUCT_BUNDLE_IDENTIFIER = "myCompany.HDB-Li.LLDebugToolDemo";
1019+
PRODUCT_BUNDLE_IDENTIFIER = myCompany.HDB.LLDebugToolDemo;
10201020
PRODUCT_NAME = "$(TARGET_NAME)";
10211021
PROVISIONING_PROFILE_SPECIFIER = "";
10221022
TARGETED_DEVICE_FAMILY = "1,2";

0 commit comments

Comments
 (0)