aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/demoserver.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/demoserver.cpp b/src/demoserver.cpp
index 9f1e533d..fcb5003d 100644
--- a/src/demoserver.cpp
+++ b/src/demoserver.cpp
@@ -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#"))
{