Merge branch '0.5.x' into 0.6.0.x
[novacoin.git] / src / qt / bitcoin.cpp
index 9fea2c1..58070d4 100644 (file)
@@ -123,6 +123,11 @@ void InitMessage(const std::string &message)
     }
 }
 
+void QueueShutdown()
+{
+    QMetaObject::invokeMethod(QCoreApplication::instance(), "quit", Qt::QueuedConnection);
+}
+
 /*
    Translate string to current locale using Qt.
  */
@@ -290,6 +295,7 @@ int main(int argc, char *argv[])
                 window.hide();
                 guiref = 0;
             }
+            // Shutdown the core and it's threads, but don't exit Bitcoin-Qt here
             Shutdown(NULL);
         }
         else