DynamicChannelImpl::Close check if it's closed first

Coule be the case where it's closed, but the client called Close()
before that.

Bug: 167263142
Test: cert/run --host
Tag: #gd-refactor
Change-Id: I5c74081d38e02ece143d7a7ee46606bed83a5f2d
diff --git a/system/gd/l2cap/internal/dynamic_channel_impl.cc b/system/gd/l2cap/internal/dynamic_channel_impl.cc
index 07ebb19..372f753 100644
--- a/system/gd/l2cap/internal/dynamic_channel_impl.cc
+++ b/system/gd/l2cap/internal/dynamic_channel_impl.cc
@@ -55,6 +55,10 @@
 }
 
 void DynamicChannelImpl::Close() {
+  if (link_ == nullptr) {
+    LOG_ERROR("Channel is already closed");
+    return;
+  }
   link_->SendDisconnectionRequest(cid_, remote_cid_);
 }