mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 12:19:03 +03:00
Do not initialize all the application if another instance is running
This fixes a crash becasue we were constructing the systemtray and then destroying it too early before the systemtray could initilize itself. (This work around a bug in QSystemTray which crashes if it is destroyed before it is registered to the X11 server)
This commit is contained in:
parent
ebfe2c793e
commit
b6e4575dea
2 changed files with 4 additions and 1 deletions
|
@ -35,7 +35,6 @@ int main(int argc, char **argv)
|
|||
Q_INIT_RESOURCE(mirall);
|
||||
|
||||
Mirall::Application app(argc, argv);
|
||||
app.initialize();
|
||||
#ifndef Q_OS_WIN
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
|
|
|
@ -95,6 +95,10 @@ Application::Application(int &argc, char **argv) :
|
|||
//no need to waste time;
|
||||
if ( _helpOnly ) return;
|
||||
|
||||
initialize();
|
||||
if (isRunning())
|
||||
return;
|
||||
|
||||
setupLogging();
|
||||
setupTranslations();
|
||||
|
||||
|
|
Loading…
Reference in a new issue