diff --git a/mozilla/content/xbl/src/nsXBLContentSink.cpp b/mozilla/content/xbl/src/nsXBLContentSink.cpp index 21f824c0f4d..e565620ca1a 100644 --- a/mozilla/content/xbl/src/nsXBLContentSink.cpp +++ b/mozilla/content/xbl/src/nsXBLContentSink.cpp @@ -766,12 +766,14 @@ nsXBLContentSink::ConstructField(const PRUnichar **aAtts, PRUint32 aLineNumber) } } - // All of our pointers are now filled in. Construct our field with all of - // these parameters. - mField = new nsXBLProtoImplField(name, readonly); - if (mField) { - mField->SetLineNumber(aLineNumber); - AddMember(mField); + if (name) { + // All of our pointers are now filled in. Construct our field with all of + // these parameters. + mField = new nsXBLProtoImplField(name, readonly); + if (mField) { + mField->SetLineNumber(aLineNumber); + AddMember(mField); + } } }