Fix crash when aborting encoding phase of video recording in videos page if >1 video is being encoded
authorWuzzy <Wuzzy2@mail.ru>
Thu, 19 Jul 2018 19:11:39 +0200
changeset 13517 4c5c8a83e298
parent 13516 b62b14aa88d4
child 13518 d8462cc9d42d
Fix crash when aborting encoding phase of video recording in videos page if >1 video is being encoded
QTfrontend/net/tcpBase.cpp
--- a/QTfrontend/net/tcpBase.cpp	Thu Jul 19 14:01:57 2018 +0200
+++ b/QTfrontend/net/tcpBase.cpp	Thu Jul 19 19:11:39 2018 +0200
@@ -251,9 +251,15 @@
 
 void TCPBase::tcpServerReady()
 {
-    disconnect(srvsList.first(), SIGNAL(isReadyNow()), this, SLOT(tcpServerReady()));
-
-    RealStart();
+    if (!srvsList.isEmpty())
+    {
+        disconnect(srvsList.first(), SIGNAL(isReadyNow()), this, SLOT(tcpServerReady()));
+        RealStart();
+    }
+    else
+    {
+        qDebug("tcpServerReady() called while srvsList was empty. Not starting TCP server");
+    }
 }
 
 void TCPBase::Start(bool couldCancelPreviousRequest)