mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fixing bug 441923. Stop our SDK sample plugins from crashing on destruction. r+sr=jonas@sicking.cc
This commit is contained in:
parent
3c3ddb020f
commit
de3d3fb4db
@ -95,8 +95,10 @@ nsPluginInstance::~nsPluginInstance()
|
||||
// so releasing it here does not guarantee that it is over
|
||||
// we should take precaution in case it will be called later
|
||||
// and zero its mPlugin member
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_IF_RELEASE(mScriptablePeer);
|
||||
if (mScriptablePeer) {
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_RELEASE(mScriptablePeer);
|
||||
}
|
||||
}
|
||||
|
||||
NPBool nsPluginInstance::init(NPWindow* aWindow)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
@ -126,8 +126,10 @@ nsPluginInstance::~nsPluginInstance()
|
||||
// so releasing it here does not guarantee that it is over
|
||||
// we should take precaution in case it will be called later
|
||||
// and zero its mPlugin member
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_IF_RELEASE(mScriptablePeer);
|
||||
if (mScriptablePeer) {
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_RELEASE(mScriptablePeer);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
@ -93,8 +93,10 @@ nsPluginInstance::~nsPluginInstance()
|
||||
// so releasing it here does not guarantee that it is over
|
||||
// we should take precaution in case it will be called later
|
||||
// and zero its mPlugin member
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_IF_RELEASE(mScriptablePeer);
|
||||
if (mScriptablePeer) {
|
||||
mScriptablePeer->SetInstance(NULL);
|
||||
NS_RELEASE(mScriptablePeer);
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK PluginWinProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user