Skip to content

Commit

Permalink
Restructure conditional logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ejensen committed Apr 27, 2016
1 parent fcf4a4d commit f2ab6ca
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions AsyncDisplayKit/ASVideoNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ - (AVPlayerItem *)constructPlayerItem
{
ASDN::MutexLocker l(_videoLock);

if ([_asset isKindOfClass:[AVURLAsset class]]) {
return [[AVPlayerItem alloc] initWithURL:((AVURLAsset *)_asset).URL];
} else if (_asset != nil) {
return [[AVPlayerItem alloc] initWithAsset:_asset];
if (_asset != nil) {
if ([_asset isKindOfClass:[AVURLAsset class]]) {
return [[AVPlayerItem alloc] initWithURL:((AVURLAsset *)_asset).URL];
} else {
return [[AVPlayerItem alloc] initWithAsset:_asset];
}
}

return nil;
Expand Down

0 comments on commit f2ab6ca

Please sign in to comment.