From 19b8e5925bb7fc2d76d9afa8b97408020c556ad6 Mon Sep 17 00:00:00 2001 From: "beng@google.com" Date: Wed, 8 Oct 2008 04:04:46 +0000 Subject: 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 --- chrome/browser/views/tabs/dragged_tab_controller.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'chrome/browser/views') 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); } -- cgit v1.1