Abort Negotiate() if DoCreateOffer() fails.

Addressing crash in test.

R=jiayl@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/19239004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7066 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2014-09-04 15:27:49 +00:00
parent d57c95fde4
commit ceb956b29d

View File

@ -614,7 +614,7 @@ class JsepTestClient
} }
virtual void Negotiate(bool audio, bool video) { virtual void Negotiate(bool audio, bool video) {
rtc::scoped_ptr<SessionDescriptionInterface> offer; rtc::scoped_ptr<SessionDescriptionInterface> offer;
EXPECT_TRUE(DoCreateOffer(offer.use())); ASSERT_TRUE(DoCreateOffer(offer.use()));
if (offer->description()->GetContentByName("audio")) { if (offer->description()->GetContentByName("audio")) {
offer->description()->GetContentByName("audio")->rejected = !audio; offer->description()->GetContentByName("audio")->rejected = !audio;