Fixed the demo not loading properly when the user is prompted for the binary path

Sun, 07 Jun 2015 18:31:19 +0300

author
Teemu Piippo <tsapii@utu.fi>
date
Sun, 07 Jun 2015 18:31:19 +0300
changeset 51
5e4bd3b212ce
parent 50
5dc8b48f80b3
child 52
7dcfac8a9f17

Fixed the demo not loading properly when the user is prompted for the binary path

launcher/demo.cpp file | annotate | diff | comparison | revisions
--- a/launcher/demo.cpp	Sun Jun 07 18:11:06 2015 +0300
+++ b/launcher/demo.cpp	Sun Jun 07 18:31:19 2015 +0300
@@ -21,6 +21,7 @@
 #include <QMessageBox>
 #include <QProcess>
 #include <errno.h>
+#include <assert.h>
 #include <commonlib/misc.h>
 #include <commonlib/config.h>
 #include <commonlib/version.h>
@@ -165,6 +166,10 @@
 	uint8 connectionType;
 };
 
+//
+// -------------------------------------------------------------------------------------------------
+//
+
 struct DemoHeaders
 {
 	uint8 length;
@@ -174,6 +179,10 @@
 	uint8 wads;
 };
 
+//
+// -------------------------------------------------------------------------------------------------
+//
+
 int launchDemo (QString path)
 {
 	QFile f (path);
@@ -302,6 +311,9 @@
 
 		if (not prompt->exec())
 			return 1;
+
+		version = findVersion (zanversion);
+		assert (not version.name.isNull());
 	}
 
 	QString iwadpath;

mercurial