Skip to content

Commit

Permalink
Bug 1313102 - Fix crash when calculating sizes for VectorImage memory…
Browse files Browse the repository at this point in the history
… reports. r=tnikkel
  • Loading branch information
aosmond committed Oct 26, 2016
1 parent 58978be commit 45bd87c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions image/VectorImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ VectorImage::Init(const char* aMimeType,
size_t
VectorImage::SizeOfSourceWithComputedFallback(MallocSizeOf aMallocSizeOf) const
{
if (!mSVGDocumentWrapper) {
return 0; // No document, so no memory used for the document.
}

nsIDocument* doc = mSVGDocumentWrapper->GetDocument();
if (!doc) {
return 0; // No document, so no memory used for the document.
Expand Down

0 comments on commit 45bd87c

Please sign in to comment.