Bug 820538: Added media-ptr check because of NS_DISPATCH_SYNC. r=rjesup

This commit is contained in:
Jan-Ivar Bruaroey 2013-01-04 23:01:56 -05:00
parent 604a7736e5
commit 7fc1ad4d05

View File

@ -2665,12 +2665,10 @@ vcmCreateTransportFlow(sipcc::PeerConnectionImpl *pc, int level, bool rtcp,
WrapRunnableRet(flow, &TransportFlow::PushLayers, layers, &res),
NS_DISPATCH_SYNC);
if (NS_FAILED(rv) || NS_FAILED(res)) {
if (NS_FAILED(rv) || NS_FAILED(res) || !pc->media().get()) { // SYNC re-check
return NULL;
}
pc->media()->AddTransportFlow(level, rtcp, flow);
}
return flow;
}