Bug 820538: Added media-ptr check because of NS_DISPATCH_SYNC. r=rjesup
authorJan-Ivar Bruaroey <jib@mozilla.com>
Fri, 04 Jan 2013 23:01:56 -0500
changeset 126837 eaede79d4d42ed2d0d856ed2d9f91c085ca68c07
parent 126836 888bf659fa9f83d1602601ba6b2232e839d877b5
child 126838 07fa18b4c450d3289519e60fa3592a644857d2c3
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrjesup
bugs820538
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 820538: Added media-ptr check because of NS_DISPATCH_SYNC. r=rjesup
media/webrtc/signaling/src/media/VcmSIPCCBinding.cpp
--- a/media/webrtc/signaling/src/media/VcmSIPCCBinding.cpp
+++ b/media/webrtc/signaling/src/media/VcmSIPCCBinding.cpp
@@ -2660,17 +2660,15 @@ vcmCreateTransportFlow(sipcc::PeerConnec
     layers.push(dtls.forget());
 
 
     // Layers are now owned by the flow.
     nsresult rv = pc->media()->ice_ctx()->thread()->Dispatch(
         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;
 }