From 7b67ce87025a8b6065c3726c60a2567d16295ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 2 Apr 2025 22:01:51 +0200 Subject: [PATCH] Bug 1957689 - Appease old gcc which doesn't like the nullptr vs NonNull ternary. MANUAL PUSH: Trivial bustage fix CLOSED TREE --- dom/svg/SVGUseElement.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dom/svg/SVGUseElement.cpp b/dom/svg/SVGUseElement.cpp index 7c6c7ab3b4c7..28bc68332fbe 100644 --- a/dom/svg/SVGUseElement.cpp +++ b/dom/svg/SVGUseElement.cpp @@ -491,13 +491,17 @@ Document* SVGUseElement::GetSourceDocument() const { } nsIURI* SVGUseElement::GetSourceDocURI() const { - auto* doc = GetSourceDocument(); - return doc ? doc->GetDocumentURI() : nullptr; + if (auto* doc = GetSourceDocument()) { + return doc->GetDocumentURI(); + } + return nullptr; } const Encoding* SVGUseElement::GetSourceDocCharacterSet() const { - auto* doc = GetSourceDocument(); - return doc ? doc->GetDocumentCharacterSet() : nullptr; + if (auto* doc = GetSourceDocument()) { + return doc->GetDocumentCharacterSet(); + } + return nullptr; } static nsINode* GetClonedChild(const SVGUseElement& aUseElement) {