From 4c86b80b118d3a92eab67328bd6a995e017c9d33 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 20 Jul 2010 17:08:42 +0000 Subject: [PATCH] Fix possible crash on exit with Qt 4.6 --- src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 72d4a66f0..498ed8806 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -182,6 +182,14 @@ int main(int argc, char *argv[]){ #endif #endif + // XXX: Workaround to avoid the following Qt bug: + // http://bugreports.qt.nokia.com/browse/QTBUG-7105 +#ifndef DISABLE_GUI + // Force the creation of an input context to avoid + // a crash in QApplication destructor + app->inputContext(); +#endif + // Check if qBittorrent is already running for this user if(app->isRunning()) { qDebug("qBittorrent is already running for this user.");