* Check to see if the directory exists and exit if not.
[WebKit-https.git] / WebKitTools / DumpRenderTree / qt / main.cpp
index e48cd073f7ff6893c83df93118e07239c37de126..d60b4a91ccffe1c36871fe99af8f86b4cd1b5166 100644 (file)
@@ -99,11 +99,11 @@ int main(int argc, char* argv[])
     FcInit();
     FcConfig *config = FcConfigCreate();
     QByteArray fontDir = getenv("WEBKIT_TESTFONTS");
-    if (fontDir.isEmpty()) {
+    if (fontDir.isEmpty() || !QDir(fontDir).exists()) {
         fprintf(stderr,
                 "\n\n"
                 "--------------------------------------------------------------------\n"
-                "WEBKIT_TESTFONTS environment variable is not set.\n"
+                "WEBKIT_TESTFONTS environment variable is not set correctly.\n"
                 "This variable has to point to the directory containing the fonts\n"
                 "you can checkout from svn://labs.trolltech.com/svn/webkit/testfonts\n"
                 "--------------------------------------------------------------------\n"