Fixing crash when aData is null in nsGlobalWindow:Observe() when observing dom storage notifications. Fallout from bug 335540.

This commit is contained in:
jst%mozilla.jstenback.com 2006-05-19 06:51:10 +00:00
parent ed47496c33
commit d69765ac47

View File

@ -5585,9 +5585,9 @@ nsGlobalWindow::Observe(nsISupports* aSubject, const char* aTopic,
NS_ENSURE_SUCCESS(rv, rv);
}
mPendingStorageEvents->Put(Substring(aData,
aData + nsCRT::strlen(aData)),
PR_TRUE);
if (aData) {
mPendingStorageEvents->Put(nsDependentString(aData), PR_TRUE);
}
return NS_OK;
}