forgot to return after destroying the connection (#412)

Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
This commit is contained in:
stonedDiscord 2021-01-18 15:39:35 +01:00 committed by GitHub
parent 5786694b53
commit ed9ecfda47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,11 +37,17 @@ void DemoServer::accept_connection()
{
QString path = QFileDialog::getOpenFileName(nullptr, tr("Load Demo"), "logs/", tr("Demo Files (*.demo)"));
if (path.isEmpty())
{
destroy_connection();
return;
}
load_demo(path);
if (demo_data.isEmpty())
{
destroy_connection();
return;
}
if (demo_data.head().startsWith("SC#"))
{