diff options
author | ritsuka <damiog@gmail.com> | 2014-11-02 15:12:15 +0000 |
---|---|---|
committer | ritsuka <damiog@gmail.com> | 2014-11-02 15:12:15 +0000 |
commit | 2857c1fd3d6762d787a90474440b1def74223232 (patch) | |
tree | 090fe602c738b294a2d504fdea0df9b3499050e4 /macosx | |
parent | 8e21821e0a65b7b81c27c3cd7f398193be731ab3 (diff) |
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
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBSubtitlesController.h | 2 | ||||
-rw-r--r-- | macosx/HBSubtitlesController.m | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/macosx/HBSubtitlesController.h b/macosx/HBSubtitlesController.h index 013074cf0..dd41d1d81 100644 --- a/macosx/HBSubtitlesController.h +++ b/macosx/HBSubtitlesController.h @@ -29,7 +29,7 @@ extern NSString *keySubTrackSrtCharCode; */ @interface HBSubtitlesController : NSViewController <HBViewValidation> -- (void)addTracksFromQueue:(NSMutableArray *)newSubtitleArray; +- (void)addTracksFromQueue:(NSArray *)queueSubtitleArray; - (void)applySettingsFromPreset:(NSDictionary *)preset; 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]; } |