From da196c607637ba8e31af81078564fd57894ef913 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Tue, 6 Oct 2009 20:08:19 +0000 Subject: Fix double delete in NPObjectStub that I introduced. TBR=ananta BUG=23713, 23706 Review URL: http://codereview.chromium.org/251105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28147 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/plugin/npobject_stub.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chrome/plugin') diff --git a/chrome/plugin/npobject_stub.cc b/chrome/plugin/npobject_stub.cc index 9f07211..7b0e213 100644 --- a/chrome/plugin/npobject_stub.cc +++ b/chrome/plugin/npobject_stub.cc @@ -87,7 +87,9 @@ void NPObjectStub::OnMessageReceived(const IPC::Message& msg) { } void NPObjectStub::OnChannelError() { - delete this; + // If npobject_ is NULLed out, that means a DeleteSoon is happening. + if (npobject_) + delete this; } void NPObjectStub::OnRelease(IPC::Message* reply_msg) { -- cgit v1.1