diff --git a/rdf/content/src/nsRDFGenericElement.cpp b/rdf/content/src/nsRDFGenericElement.cpp index 5cfaf0bfa134..40e7c039ab67 100644 --- a/rdf/content/src/nsRDFGenericElement.cpp +++ b/rdf/content/src/nsRDFGenericElement.cpp @@ -1018,7 +1018,7 @@ RDFGenericElementImpl::SetAttribute(PRInt32 aNameSpaceID, if (xulListener->mAttribute.EqualsIgnoreCase(aString)) { // Set the attribute in the broadcast listener. - nsCOMPtr contentNode(xulListener->mListener); + nsCOMPtr contentNode(do_QueryInterface(xulListener->mListener)); if (contentNode) { contentNode->SetAttribute(aNameSpaceID, aName, aValue, aNotify); @@ -1101,7 +1101,7 @@ RDFGenericElementImpl::UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, PRBo if (xulListener->mAttribute.EqualsIgnoreCase(aString)) { // Unset the attribute in the broadcast listener. - nsCOMPtr contentNode(xulListener->mListener); + nsCOMPtr contentNode(do_QueryInterface(xulListener->mListener)); if (contentNode) { contentNode->UnsetAttribute(aNameSpaceID, aName, aNotify);