It doesn't make much sense to make checks like 'if(game)' if you never set game to 0. Using smart pointers instead. Does it fix segfaults? Probably.
#include <QApplication>
#include "mainform.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyWindow *mainWin = new MyWindow;
mainWin->show();
return app.exec();
}