fixes bug 234620 "Unknown random SEGV/seg fault/core dumps/crashes, only thing on is Mail/IMAP" r=dbaron sr=bienvenu

This commit is contained in:
darin%meer.net 2004-11-04 02:34:11 +00:00
Родитель 04b24dd95c
Коммит a3a42ca4f6
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -219,8 +219,11 @@ nsEventQueueImpl::StopAcceptingEvents()
void
nsEventQueueImpl::NotifyObservers(const char *aTopic)
{
nsresult rv;
// we must not invoke the observer service from a background thread!
if (!nsIThread::IsMainThread())
return;
nsresult rv;
nsCOMPtr<nsIObserverService> os = do_GetService("@mozilla.org/observer-service;1", &rv);
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIEventQueue> kungFuDeathGrip(this);