Commit 4a1d2bad authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

Prevent runtime exception

parent fc398475
...@@ -614,6 +614,8 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData"; ...@@ -614,6 +614,8 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
MLFile* object = _foundMedia[fromIndexPath.item]; MLFile* object = _foundMedia[fromIndexPath.item];
[_foundMedia removeObjectAtIndex:fromIndexPath.item]; [_foundMedia removeObjectAtIndex:fromIndexPath.item];
[_foundMedia insertObject:object atIndex:toIndexPath.item]; [_foundMedia insertObject:object atIndex:toIndexPath.item];
if (![object isKindOfClass:[MLFile class]])
return;
object.folderTrackNumber = @(toIndexPath.item - 1); object.folderTrackNumber = @(toIndexPath.item - 1);
object = [_foundMedia objectAtIndex:fromIndexPath.item]; object = [_foundMedia objectAtIndex:fromIndexPath.item];
object.folderTrackNumber = @(fromIndexPath.item - 1); object.folderTrackNumber = @(fromIndexPath.item - 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment