diff --git a/mozilla/xpcom/glue/nsThreadUtils.cpp b/mozilla/xpcom/glue/nsThreadUtils.cpp index 0ae127194d7..1bc0a60f6b7 100644 --- a/mozilla/xpcom/glue/nsThreadUtils.cpp +++ b/mozilla/xpcom/glue/nsThreadUtils.cpp @@ -136,7 +136,7 @@ NS_DispatchToCurrentThread(nsIRunnable *event) { #ifdef MOZILLA_INTERNAL_API nsIThread *thread = NS_GetCurrentThread(); - NS_ENSURE_STATE(thread); + if (!thread) { return NS_ERROR_UNEXPECTED; } #else nsCOMPtr thread; nsresult rv = NS_GetCurrentThread(getter_AddRefs(thread));