Bug 827841 - don't proxy-release null pointers in nsMainThreadPtrHolder; r=jlebar

This commit is contained in:
Mike Habicher 2013-01-08 13:40:18 -05:00
parent f53866e76a
commit 9804a8333a

View File

@ -117,7 +117,7 @@ public:
~nsMainThreadPtrHolder() {
if (NS_IsMainThread()) {
NS_IF_RELEASE(mRawPtr);
} else {
} else if (mRawPtr) {
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
if (!mainThread) {
NS_WARNING("Couldn't get main thread! Leaking pointer.");