#include "coreproxy.h"
#include "settings.h"
#include "chatwidget.h"
+#include "mainwin.h"
int main(int argc, char **argv) {
QApplication app(argc, argv);
Settings::init();
Style::init();
- //MainWin *mainWin = new MainWin();
+ MainWin *mainWin = new MainWin();
//mainWin->show();
- //mainWin->init();
- Client::instance();
+ Client::init(mainWin);
+ mainWin->init();
int exitCode = app.exec();
//delete core;
+
+ // the mainWin has to be deleted before the Core
+ // if not Quassel will crash on exit under certain conditions since the gui
+ // still wants to access clientdata
+ delete mainWin;
Client::destroy();
Core::destroy();
//delete guiProxy;