git » sdk » commit 805e664

Fix crash on hangup

author Stephen Paul Weber
2024-10-17 03:55:13 UTC
committer Stephen Paul Weber
2024-10-17 03:55:13 UTC
parent 38e7f35325a60e385375c8994cf9332fff07eb0d

Fix crash on hangup

snikket/jingle/PeerConnection.cpp.hx +1 -1

diff --git a/snikket/jingle/PeerConnection.cpp.hx b/snikket/jingle/PeerConnection.cpp.hx
index 12e7b49..01b13f4 100644
--- a/snikket/jingle/PeerConnection.cpp.hx
+++ b/snikket/jingle/PeerConnection.cpp.hx
@@ -440,7 +440,7 @@ class MediaStreamTrack {
 				untyped __cpp__("{0}->onFrame([this](rtc::binary msg, rtc::FrameInfo frame_info) { this->onFrame(msg, frame_info); });", track);
 				untyped __cpp__("{0}->onOpen([this]() { this->notifyReadyForData(true); });", track);
 			}
-			untyped __cpp__("{0}->onClosed([this]() { this->stop(); });", track);
+			untyped __cpp__("{0}->onClosed([this]() { int base = 0; hx::SetTopOfStack(&base, true); this->stop(); hx::SetTopOfStack((int*)0, true); });", track);
 		} else {
 			throw "Track already set";
 		}