Authored by 盖剑秋

add string null proctection.

... ... @@ -2,70 +2,4 @@
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "YohoLive/Classes/YH_SocketService.m"
timestampString = "493980931.071469"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "342"
endingLineNumber = "342"
landmarkName = "-logout"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "YohoLive/Classes/YH_SocketService.m"
timestampString = "493980931.071469"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "347"
endingLineNumber = "347"
landmarkName = "-logout"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "YohoLive/Classes/YH_SocketService.m"
timestampString = "493980931.071469"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "350"
endingLineNumber = "350"
landmarkName = "-logout"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "YohoLive/Classes/YH_SocketService.m"
timestampString = "493980917.098365"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "200"
endingLineNumber = "200"
landmarkName = "-socket:didConnectToHost:port:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
... ...
... ... @@ -245,15 +245,15 @@
[self toastTip:@"没有可用直播间"];
}
YH_ChannelModel *model = [YH_ChannelModel new];
model.roomTitle = obj[@"name"];
model.roomURL = obj[@"url"];
model.channel_id = obj[@"channel_id"];
model.cid = obj[@"cid"];
model.app = obj[@"app"];
model.type = obj[@"type"];
model.room = obj[@"id"];
model.title = obj[@"title"];
model.secret = obj[@"secret"];
model.roomTitle = IsNilOrNull(obj[@"name"])?@"":obj[@"name"];
model.roomURL = IsNilOrNull(obj[@"url"])?@"":obj[@"url"];
model.channel_id = IsNilOrNull(obj[@"channel_id"])?@"":obj[@"channel_id"];
model.cid = IsNilOrNull(obj[@"cid"])?@"":obj[@"cid"];
model.app = IsNilOrNull(obj[@"app"])?@"":obj[@"app"];
model.type = IsNilOrNull(obj[@"type"])?@"":obj[@"type"];
model.room = IsNilOrNull(obj[@"id"])?@"":obj[@"id"];
model.title = IsNilOrNull(obj[@"title"])?@"":obj[@"title"];
model.secret = IsNilOrNull(obj[@"secret"])?@"":obj[@"secret"];
[tempAry addObject:model];
if (_currentChannel&&[_currentChannel.roomURL isEqualToString:model.roomURL]) {
_currentChannelIndex = idx;
... ...