From d90dd7b0c60e7950b668a08d415c0395c92db535 Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Thu, 5 Sep 2019 11:29:47 +0200 Subject: Ensure the right body element is used throughout the method call. --- dom/html/ImageDocument.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dom/html/ImageDocument.cpp') diff --git a/dom/html/ImageDocument.cpp b/dom/html/ImageDocument.cpp index f83a804be..451d989c3 100644 --- a/dom/html/ImageDocument.cpp +++ b/dom/html/ImageDocument.cpp @@ -659,7 +659,7 @@ ImageDocument::CreateSyntheticDocument() NS_ENSURE_SUCCESS(rv, rv); // Add the image element - Element* body = GetBodyElement(); + RefPtr body = GetBodyElement(); if (!body) { NS_WARNING("no body on image document!"); return NS_ERROR_FAILURE; -- cgit v1.2.3