Fix Profile startup crash

This commit is contained in:
Mark Watkins 2011-09-11 17:22:31 +10:00
parent 28049d5f2d
commit f9bd536f54

View File

@ -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);