diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp
index 8cc476f53..10a3f015a 100644
--- a/apps/launcher/maindialog.cpp
+++ b/apps/launcher/maindialog.cpp
@@ -612,8 +612,21 @@ void MainDialog::closeEvent(QCloseEvent *event)
void MainDialog::play()
{
- if (!writeSettings())
+ if (!writeSettings()) {
qApp->quit();
+ return;
+ }
+
+ if(!mGameSettings.hasMaster()) {
+ QMessageBox msgBox;
+ msgBox.setWindowTitle(tr("No master file selected"));
+ msgBox.setIcon(QMessageBox::Warning);
+ msgBox.setStandardButtons(QMessageBox::Ok);
+ msgBox.setText(tr("
You do not have any master files selected.
\
+ OpenMW will not start without a master file selected.
"));
+ msgBox.exec();
+ return;
+ }
// Launch the game detached
startProgram(QString("openmw"), true);
diff --git a/apps/launcher/settings/gamesettings.hpp b/apps/launcher/settings/gamesettings.hpp
index 7a17ef9af..55b2107e2 100644
--- a/apps/launcher/settings/gamesettings.hpp
+++ b/apps/launcher/settings/gamesettings.hpp
@@ -43,6 +43,7 @@ public:
inline QStringList getDataDirs() { return mDataDirs; }
inline void addDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.append(dir); }
inline QString getDataLocal() {return mDataLocal; }
+ inline bool hasMaster() { return mSettings.count(QString("master")) > 0; }
QStringList values(const QString &key, const QStringList &defaultValues = QStringList());
bool readFile(QTextStream &stream);