diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index 0f9423319f3..9c3006b52d2 100644 --- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -3930,22 +3930,19 @@ nsWebBrowserPersist::SetDocumentBase( // Add the BASE element if (!baseElement) { - if (!baseElement) - { - nsCOMPtr newNode; - if (xmlDoc) - { - aDocument->CreateElementNS( - kXHTMLNS, - kBase, getter_AddRefs(baseElement)); - } - else - { - aDocument->CreateElement( - kBase, getter_AddRefs(baseElement)); - } - headElement->AppendChild(baseElement, getter_AddRefs(newNode)); - } + nsCOMPtr newNode; + if (xmlDoc) + { + aDocument->CreateElementNS( + kXHTMLNS, + kBase, getter_AddRefs(baseElement)); + } + else + { + aDocument->CreateElement( + kBase, getter_AddRefs(baseElement)); + } + headElement->AppendChild(baseElement, getter_AddRefs(newNode)); } if (!baseElement) {