message: Check for null before accessing SctpTransport map.
  Cr-Commit-Position: refs/heads/master@{#31720}
diff: @@ -311,18 +311,21 @@ class SctpTransport::UsrSctpWrapper {
  }
  static void UninitializeUsrSctp() {
  - delete g_transport_map_;
  RTC_LOG(LS_INFO) << __FUNCTION__;
  // usrsctp_finish() may fail if it's called too soon after the transports
  // are
  // closed. Wait and try again until it succeeds for up to 3 seconds.
  for (size_t i = 0; i < 300; ++i) {
  if (usrsctp_finish() == 0) {
  + delete g_transport_map_;
  + g_transport_map_ = nullptr;
  return;
  }
  rtc::Thread::SleepMs(10);
  }
  + delete g_transport_map_;
  + g_transport_map_ = nullptr;
  RTC_LOG(LS_ERROR) << "Failed to shutdown usrsctp.";
  }
  @@ -349,6 +352,11 @@ class SctpTransport::UsrSctpWrapper {
  size_t length,
  uint8_t tos,
  uint8_t set_df) {
  + if (!g_transport_map_) {
  + RTC_LOG(LS_ERROR)
  + << "OnSctpOutboundPacket called after usrsctp uninitialized?";
  + return EINVAL;
  + }
  SctpTransport* transport =
  g_transport_map_->Retrieve(reinterpret_cast<uintptr_t>(addr));
  if (!transport) {
  @@ -405,6 +413,12 @@ class SctpTransport::UsrSctpWrapper {
  // id of the transport that created them, so [0] is as good as any other.
  struct sockaddr_conn* sconn =
  reinterpret_cast<struct sockaddr_conn*>(&addrs[0]);
  + if (!g_transport_map_) {
  + RTC_LOG(LS_ERROR)
  + << "GetTransportFromSocket called after usrsctp uninitialized?";
  + usrsctp_freeladdrs(addrs);
  + return nullptr;
  + }
  SctpTransport* transport = g_transport_map_->Retrieve(
  reinterpret_cast<uintptr_t>(sconn->sconn_addr));
  usrsctp_freeladdrs(addrs);
  