Fix crash at shutdown.

The context pointer was dereferenced after the context object was deleted. This is fixed by storing a pointer to the MainWindow in QTFullScreen, so context does not have to be dereferenced.

The logic in QTFullScreen::eventFilter is also simplified a bit.
This commit is contained in:
Ilja Booij
2014-04-07 20:18:02 +02:00
parent ae3b785531
commit 57795d2d2e
5 changed files with 18 additions and 28 deletions

View File

@@ -145,7 +145,7 @@ MainWindow::MainWindow(const QDir &home)
static const QIcon fullIcon(":images/toolbar/main/togglefull.png");
#ifndef Q_OS_MAC
fullScreen = new QTFullScreen(context);
fullScreen = new QTFullScreen(this);
#endif
// if no workout directory is configured, default to the