From 2858c50449cb09cac1cb44b3e33221f80276733f Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 21 Apr 2020 13:29:09 +0200 Subject: [PATCH] Prevent potential race --- lib/ui/screens/call_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/screens/call_screen.dart b/lib/ui/screens/call_screen.dart index edfc303..2f11a1c 100644 --- a/lib/ui/screens/call_screen.dart +++ b/lib/ui/screens/call_screen.dart @@ -224,8 +224,8 @@ class _CallScreenState extends SafeState { _peersConnections[memberID] = peerConnection; // Create a renderer - _renderers[memberID] = RTCVideoRenderer() - ..initialize(); // TODO Use await instead for initialize + _renderers[memberID] = RTCVideoRenderer(); + await _renderers[memberID].initialize(); // Register callbacks peerConnection.onIceCandidate =