Skip to content

Commit 89a5f67

Browse files
author
Edward Smith
committed
Fixed static analysis error.
1 parent 56a2000 commit 89a5f67

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Branch-SDK/Branch-SDK/BranchContentDiscoverer.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,17 @@ - (UIViewController *)getActiveViewController:(UIViewController *)rootViewContro
240240
return activeController;
241241
}
242242

243-
- (void)addFormattedContentData:(NSMutableArray *)contentDataArray withText:(NSString *)contentData clearText:(BOOL)isClearText {
243+
- (void)addFormattedContentData:(NSMutableArray *)contentDataArray
244+
withText:(NSString *)contentData
245+
clearText:(BOOL)isClearText {
244246
if (contentData && contentData.length > _cdManifest.maxTextLen) {
245247
contentData = [contentData substringToIndex:_cdManifest.maxTextLen];
246248
}
247249
if (!isClearText) {
248250
contentData = [BNCEncodingUtils md5Encode:contentData];
249251
}
250-
[contentDataArray addObject:contentData];
252+
if (contentData)
253+
[contentDataArray addObject:contentData];
251254
}
252255

253256
- (NSString *)getContentText:(UIView *)view {

0 commit comments

Comments
 (0)