From f9bd536f54378d00196236cfb224121c20e2ed0e Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 11 Sep 2011 17:22:31 +1000 Subject: [PATCH] Fix Profile startup crash --- mainwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 236ee929..c7096053 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -110,9 +110,6 @@ MainWindow::MainWindow(QWidget *parent) : if (!pref.Exists("Profile")) pref["Profile"]=getUserName(); - profile=Profiles::Get(pref["Profile"].toString()); - Q_ASSERT(profile!=NULL); - if (!pref.Exists("LinkGraphMovement")) pref["LinkGraphMovement"]=true; ui->action_Link_Graphs->setChecked(pref["LinkGraphMovement"].toBool()); @@ -176,6 +173,9 @@ void MainWindow::Startup() qprogress->show(); //qstatusbar->showMessage(tr("Loading Data"),0); + profile=Profiles::Get(pref["Profile"].toString()); + Q_ASSERT(profile!=NULL); + profile->LoadMachineData(); daily=new Daily(ui->tabWidget,profile,NULL,this);