From 5482728d2bd514aed265676c87b08ed3fa4249a5 Mon Sep 17 00:00:00 2001 From: "dbaron%fas.harvard.edu" Date: Wed, 14 Nov 2001 08:17:19 +0000 Subject: [PATCH] Fix assertions that I caused with my previous checkin. sr=hyatt --- content/xbl/src/nsXBLContentSink.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/xbl/src/nsXBLContentSink.cpp b/content/xbl/src/nsXBLContentSink.cpp index 53b535e3def3..29c27d654da6 100644 --- a/content/xbl/src/nsXBLContentSink.cpp +++ b/content/xbl/src/nsXBLContentSink.cpp @@ -300,6 +300,12 @@ nsresult nsXBLContentSink::FlushText(PRBool aCreateTextNode, PRBool* aDidFlush) { + if (mTextLength == 0) { + if (aDidFlush) + *aDidFlush = PR_FALSE; + return NS_OK; + } + const nsASingleFragmentString& text = Substring(mText, mText+mTextLength); if (mState == eXBL_InHandlers) { // Get the text and add it to the event handler.