Browse files

Initialise QCA before QCoreApplication

* Fixes segfaults with QCA head on randomInt()
  • Loading branch information...
1 parent 73f4747 commit 375f9f90d8164c7e08e6b6a702c641a9b5bb59ff @xhochy xhochy committed Mar 5, 2014
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/tomahawk/main.cpp
View
5 src/tomahawk/main.cpp
@@ -26,6 +26,8 @@
#include "config.h"
#include "utils/Logger.h"
+#include "qca.h"
+
#ifdef Q_WS_MAC
#include "TomahawkApp_Mac.h"
#include </System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/Headers/AppleEvents.h>
@@ -128,6 +130,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine
int
main( int argc, char *argv[] )
{
+ QCA::Initializer init;
+ Q_UNUSED( init )
+
#ifdef Q_WS_MAC
// Do Mac specific startup to get media keys working.
// This must go before QApplication initialisation.

0 comments on commit 375f9f9

Please sign in to comment.