Bug 1358889: check if mThread is around before dereferencing. r=jesup

MozReview-Commit-ID: 88ZonLVGZK9

--HG--
extra : rebase_source : 8d3ee2e0a9e77b73ece6d2351758ad8256b2ade0
This commit is contained in:
Nils Ohlmeier [:drno] 2017-04-24 16:15:10 -07:00
parent a6777e7838
commit 274b2c935b

View File

@ -243,7 +243,7 @@ public:
MOZ_ASSERT(mParentThread == NS_GetCurrentThread());
nsrefcnt count = --mUseCount;
MOZ_ASSERT(int32_t(mUseCount) >= 0, "illegal refcnt");
if (count == 0) {
if (mThread && count == 0) {
// in-use -> idle -- no one forcing it to remain instantiated
r_log(LOG_GENERIC,LOG_DEBUG,"Shutting down wrapped SingletonThread %p",
mThread.get());