From 323f13f1d60afc174ce51e3e933dec17774b5c8a Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Tue, 2 Mar 2010 01:50:15 +0000 Subject: Mac: Fix crash in content settings exceptions window. BUG=37137 TEST=See bug. Also, hit "add" and "remove" in succession, shouldn't crash either. Review URL: http://codereview.chromium.org/661326 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40344 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/content_exceptions_window_controller.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/browser/cocoa/content_exceptions_window_controller.mm b/chrome/browser/cocoa/content_exceptions_window_controller.mm index 1140074..741a907 100644 --- a/chrome/browser/cocoa/content_exceptions_window_controller.mm +++ b/chrome/browser/cocoa/content_exceptions_window_controller.mm @@ -263,6 +263,7 @@ static ContentExceptionsWindowController* - (IBAction)removeException:(id)sender { updatesEnabled_ = NO; NSIndexSet* selection = [tableView_ selectedRowIndexes]; + [tableView_ deselectAll:self]; // Else we'll get a |setObjectValue:| later. DCHECK_GT([selection count], 0U); NSUInteger index = [selection lastIndex]; while (index != NSNotFound) { @@ -278,6 +279,7 @@ static ContentExceptionsWindowController* - (IBAction)removeAllExceptions:(id)sender { updatesEnabled_ = NO; + [tableView_ deselectAll:self]; // Else we'll get a |setObjectValue:| later. newException_.reset(); model_->RemoveAll(); updatesEnabled_ = YES; -- cgit v1.1