Bug 836599 - Part 6: Make MediaStreamGraphImpl::AppendMessage not assume that it's the only graph; r=roc

This commit is contained in:
Ehsan Akhgari 2013-02-04 12:29:14 -05:00
parent 661babfc7c
commit b5d92eaf5e

View File

@ -1314,9 +1314,10 @@ MediaStreamGraphImpl::AppendMessage(ControlMessage* aMessage)
aMessage->RunDuringShutdown();
delete aMessage;
if (IsEmpty()) {
NS_ASSERTION(gGraph == this, "Switched managers during forced shutdown?");
gGraph = nullptr;
delete this;
if (gGraph == this) {
gGraph = nullptr;
delete this;
}
}
return;
}