diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-08 04:04:46 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-08 04:04:46 +0000 |
commit | 19b8e5925bb7fc2d76d9afa8b97408020c556ad6 (patch) | |
tree | 1193aaa21d8817c3d3b035f1e4bab6b2604f89ff /chrome/browser/views/tabs/dragged_tab_controller.cc | |
parent | 4f24e87d4c051571744bab377cc356bdef093701 (diff) | |
download | chromium_src-19b8e5925bb7fc2d76d9afa8b97408020c556ad6.zip chromium_src-19b8e5925bb7fc2d76d9afa8b97408020c556ad6.tar.gz chromium_src-19b8e5925bb7fc2d76d9afa8b97408020c556ad6.tar.bz2 |
Fix crash due to lack of NULL checking in one case.
http://crbug.com/3183
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs/dragged_tab_controller.cc')
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_controller.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc index cd8bd69..ef649e8 100644 --- a/chrome/browser/views/tabs/dragged_tab_controller.cc +++ b/chrome/browser/views/tabs/dragged_tab_controller.cc @@ -343,15 +343,12 @@ void DraggedTabController::ContinueDragging() { // dragging within it. TabStrip* target_tabstrip = GetTabStripForPoint(screen_point); if (target_tabstrip != attached_tabstrip_) { - if (target_tabstrip) { - // We may receive this event before we're fully detached from the source, - // we check for that and force a detach now. - if (attached_tabstrip_) - Detach(); - Attach(target_tabstrip, screen_point); - } else { + // Make sure we're fully detached from whatever TabStrip we're attached to + // (if any). + if (attached_tabstrip_) Detach(); - } + if (target_tabstrip) + Attach(target_tabstrip, screen_point); } MoveTab(screen_point); } |