--- a/QTfrontend/main.cpp.in Sat Nov 25 10:43:54 2006 +0000
+++ b/QTfrontend/main.cpp.in Sat Nov 25 11:56:37 2006 +0000
@@ -72,7 +72,13 @@
cfgdir->cd(".hedgewars");
datadir = new QDir("${HEDGEWARS_DATADIR}");
- datadir->cd("hedgewars/Data");
+ if(!datadir->cd("hedgewars/Data")) {
+ QMessageBox::critical(0, QMessageBox::tr("Error"),
+ QMessageBox::tr("Failed to open data directory:\n%1\n"
+ "Please check your installation").
+ arg(datadir->absolutePath()+"/hedgewars/Data"));
+ return 1;
+ }
HWForm *Form = new HWForm();
Form->show();