diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 22:26:09 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 22:26:09 +0000 |
commit | 396c3b382ee3333fcbdfa2002520dc4df65e7c7c (patch) | |
tree | 1d51c9009ee0fc1a91fda2f257c520d4995bb4f2 /chrome | |
parent | 07f0b3efd177058fec09cab96d5996624789f25d (diff) | |
download | chromium_src-396c3b382ee3333fcbdfa2002520dc4df65e7c7c.zip chromium_src-396c3b382ee3333fcbdfa2002520dc4df65e7c7c.tar.gz chromium_src-396c3b382ee3333fcbdfa2002520dc4df65e7c7c.tar.bz2 |
Fix 'inspect element' crash when hosted in external tab
If chrome tab is hosted in an external tab and 'inspect
element' is invoked via GUI (as opposed to sending an
automation request for AutomationMsg_InspectElement),
we get a crash in AutomationProvider::ReceivedInspectElementResponse
BUG=1694650
Review URL: http://codereview.chromium.org/43102
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index d127040..e37244c 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -1972,11 +1972,12 @@ void AutomationProvider::HandleInspectElementRequest( } void AutomationProvider::ReceivedInspectElementResponse(int num_resources) { - DCHECK(reply_message_ != NULL); - AutomationMsg_InspectElement::WriteReplyParams(reply_message_, - num_resources); - Send(reply_message_); - reply_message_ = NULL; + if (reply_message_) { + AutomationMsg_InspectElement::WriteReplyParams(reply_message_, + num_resources); + Send(reply_message_); + reply_message_ = NULL; + } } // Helper class for making changes to the URLRequest ProtocolFactory on the |