Don't show splash screen when -min is specified on the command line.
authorChris Moore <dooglus@gmail.com>
Sat, 25 Feb 2012 02:54:18 +0000 (18:54 -0800)
committerLuke Dashjr <luke-jr+git@utopios.org>
Mon, 27 Feb 2012 18:07:10 +0000 (13:07 -0500)
src/qt/bitcoin.cpp

index 2142db5..54e6bb3 100644 (file)
@@ -147,9 +147,12 @@ int main(int argc, char *argv[])
     app.setApplicationName(QApplication::translate("main", "Bitcoin-Qt"));
 
     QSplashScreen splash(QPixmap(":/images/splash"), 0);
-    splash.show();
-    splash.setAutoFillBackground(true);
-    splashref = &splash;
+    if (!GetBoolArg("-min"))
+    {
+        splash.show();
+        splash.setAutoFillBackground(true);
+        splashref = &splash;
+    }
 
     app.processEvents();
 
@@ -163,7 +166,8 @@ int main(int argc, char *argv[])
                 // Put this in a block, so that BitcoinGUI is cleaned up properly before
                 // calling Shutdown().
                 BitcoinGUI window;
-                splash.finish(&window);
+                if (splashref)
+                    splash.finish(&window);
                 OptionsModel optionsModel(pwalletMain);
                 ClientModel clientModel(&optionsModel);
                 WalletModel walletModel(pwalletMain, &optionsModel);