From 2857c1fd3d6762d787a90474440b1def74223232 Mon Sep 17 00:00:00 2001 From: ritsuka Date: Sun, 2 Nov 2014 15:12:15 +0000 Subject: MacGui: fixed a issue that happened on 10.8 when reloading a job from the queue: we tried to add an object to an immutable NSArray that for some reason known to the Cocoa framework was a NSMutableArray on 10.9+ , but not on 10.8. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6496 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBSubtitlesController.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'macosx/HBSubtitlesController.m') diff --git a/macosx/HBSubtitlesController.m b/macosx/HBSubtitlesController.m index 91ed94c8d..4882cc84b 100644 --- a/macosx/HBSubtitlesController.m +++ b/macosx/HBSubtitlesController.m @@ -192,13 +192,13 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex"; return [ret autorelease]; } -- (void)addTracksFromQueue:(NSMutableArray *)newSubtitleArray +- (void)addTracksFromQueue:(NSArray *)queueSubtitleArray { /* Note: we need to look for external subtitles so it can be added to the source array track. * Remember the source container subs are already loaded with resetTitle which is already called * so any external sub sources need to be added to our source subs here */ - for (id tempObject in newSubtitleArray) + for (id tempObject in queueSubtitleArray) { /* We have an srt track */ if ([tempObject[keySubTrackType] intValue] == SRTSUB) @@ -212,10 +212,9 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex"; } } - [newSubtitleArray addObject:[self createSubtitleTrack]]; - // Set the subtitleArray to the newSubtitleArray - [self.subtitleArray setArray:newSubtitleArray]; + [self.subtitleArray setArray:queueSubtitleArray]; + [self.subtitleArray addObject:[self createSubtitleTrack]]; [self.fTableView reloadData]; } -- cgit v1.2.3