mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 845234 - Add null check in VectorImage's listener Cancel methods. r=dholbert
This commit is contained in:
parent
f857806f73
commit
68f9bf1917
@ -134,8 +134,10 @@ public:
|
||||
void Cancel()
|
||||
{
|
||||
NS_ABORT_IF_FALSE(mDocument, "Duplicate call to Cancel");
|
||||
mDocument->RemoveObserver(this);
|
||||
mDocument = nullptr;
|
||||
if (mDocument) {
|
||||
mDocument->RemoveObserver(this);
|
||||
mDocument = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
@ -199,10 +201,12 @@ public:
|
||||
void Cancel()
|
||||
{
|
||||
NS_ABORT_IF_FALSE(mDocument, "Duplicate call to Cancel");
|
||||
mDocument->RemoveEventListener(NS_LITERAL_STRING("MozSVGAsImageDocumentLoad"), this, true);
|
||||
mDocument->RemoveEventListener(NS_LITERAL_STRING("SVGAbort"), this, true);
|
||||
mDocument->RemoveEventListener(NS_LITERAL_STRING("SVGError"), this, true);
|
||||
mDocument = nullptr;
|
||||
if (mDocument) {
|
||||
mDocument->RemoveEventListener(NS_LITERAL_STRING("MozSVGAsImageDocumentLoad"), this, true);
|
||||
mDocument->RemoveEventListener(NS_LITERAL_STRING("SVGAbort"), this, true);
|
||||
mDocument->RemoveEventListener(NS_LITERAL_STRING("SVGError"), this, true);
|
||||
mDocument = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user