diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-02 01:50:15 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-02 01:50:15 +0000 |
commit | 323f13f1d60afc174ce51e3e933dec17774b5c8a (patch) | |
tree | dbb75a2e43a92ae27928426459fb815188d397a3 | |
parent | f5f684ce66f28c980509b672e10ecdb8f375935a (diff) | |
download | chromium_src-323f13f1d60afc174ce51e3e933dec17774b5c8a.zip chromium_src-323f13f1d60afc174ce51e3e933dec17774b5c8a.tar.gz chromium_src-323f13f1d60afc174ce51e3e933dec17774b5c8a.tar.bz2 |
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
-rw-r--r-- | chrome/browser/cocoa/content_exceptions_window_controller.mm | 2 |
1 files changed, 2 insertions, 0 deletions
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; |