From 7507363770c4a23c48a9b510c1b45f40eea239ce Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Mon, 13 Feb 2006 19:36:01 +0000 Subject: [PATCH] Fix crash on empty getters or setters. Bug 326910, r=sicking, sr=bryner git-svn-id: svn://10.0.0.236/trunk@189845 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/xbl/src/nsXBLProtoImplProperty.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/content/xbl/src/nsXBLProtoImplProperty.cpp b/mozilla/content/xbl/src/nsXBLProtoImplProperty.cpp index 080240239f3..66c627c5545 100644 --- a/mozilla/content/xbl/src/nsXBLProtoImplProperty.cpp +++ b/mozilla/content/xbl/src/nsXBLProtoImplProperty.cpp @@ -242,7 +242,7 @@ nsXBLProtoImplProperty::CompileMember(nsIScriptContext* aContext, const nsCStrin } PRBool deletedGetter = PR_FALSE; - if (mGetterText) { + if (mGetterText && mGetterText->GetText()) { nsDependentString getter(mGetterText->GetText()); if (!getter.IsEmpty()) { // Compile into a temp object so we don't wipe out mGetterText @@ -298,7 +298,7 @@ nsXBLProtoImplProperty::CompileMember(nsIScriptContext* aContext, const nsCStrin } PRBool deletedSetter = PR_FALSE; - if (mSetterText) { + if (mSetterText && mSetterText->GetText()) { nsDependentString setter(mSetterText->GetText()); if (!setter.IsEmpty()) { // Compile into a temp object so we don't wipe out mSetterText