mirror of
https://github.com/godotengine/webrtc-native.git
synced 2026-01-03 14:09:58 +03:00
Fix crash when closing an invalid peerconnection.
This commit is contained in:
@@ -172,7 +172,10 @@ godot_error WebRTCLibPeerConnection::poll() {
|
||||
}
|
||||
|
||||
void WebRTCLibPeerConnection::close() {
|
||||
peer_connection->Close();
|
||||
if (peer_connection.get() != nullptr) {
|
||||
peer_connection->Close();
|
||||
}
|
||||
peer_connection = nullptr;
|
||||
while(!signal_queue.empty()) {
|
||||
signal_queue.pop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user