diff options
author | dynaflash <[email protected]> | 2008-01-22 16:01:59 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2008-01-22 16:01:59 +0000 |
commit | cc9e06d558bd5b33e589c9e9eb0d901654c46b4c (patch) | |
tree | d2721f60ac014be647244643f2193d864701de11 | |
parent | 800ac294c1ecf92d4298769e7335cd118f8f21c4 (diff) |
MacGui: Fix issue where selecting the chapter tab can crash the macgui if no valid source is selected
- patch by travistex
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1222 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/ChapterTitles.m | 7 | ||||
-rw-r--r-- | macosx/Controller.mm | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/macosx/ChapterTitles.m b/macosx/ChapterTitles.m index 26f71913d..deef414a4 100644 --- a/macosx/ChapterTitles.m +++ b/macosx/ChapterTitles.m @@ -23,6 +23,12 @@ { int i; NSString *chapterString; + + fTitle = title; + + if (!title) + return; + int count = hb_list_count( title->list_chapter ); for( i = 0; i < count; i++ ) @@ -38,7 +44,6 @@ } } - fTitle = title; } - (int)numberOfRowsInTableView:(NSTableView *)aTableView diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 76a40e677..5b0e2c207 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1295,6 +1295,10 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It /* We display a message if a valid dvd source was not chosen */ [fSrcDVD2Field setStringValue: @"No Valid Source Found"]; SuccessfulScan = NO; + + // Notify ChapterTitles that there's no title + [fChapterTitlesDelegate resetWithTitle:nil]; + [fChapterTable reloadData]; } else { |