Bug 1246925 - log filtering_type and mapping_type only if they are valid pointers. r?ekr
--- a/media/mtransport/nricectx.cpp
+++ b/media/mtransport/nricectx.cpp
@@ -537,20 +537,19 @@ RefPtr<NrIceCtx> NrIceCtx::Create(const
"media.peerconnection.nat_simulator.filtering_type",
&filtering_type);
rv = pref_branch->GetBoolPref(
"media.peerconnection.nat_simulator.block_udp",
&block_udp);
}
}
- MOZ_MTLOG(ML_DEBUG, "NAT filtering type: " << filtering_type);
- MOZ_MTLOG(ML_DEBUG, "NAT mapping type: " << mapping_type);
-
if (mapping_type && filtering_type) {
+ MOZ_MTLOG(ML_DEBUG, "NAT filtering type: " << filtering_type);
+ MOZ_MTLOG(ML_DEBUG, "NAT mapping type: " << mapping_type);
TestNat* test_nat = new TestNat;
test_nat->filtering_type_ = TestNat::ToNatBehavior(filtering_type);
test_nat->mapping_type_ = TestNat::ToNatBehavior(mapping_type);
test_nat->block_udp_ = block_udp;
test_nat->enabled_ = true;
ctx->SetNat(test_nat);
}