fixed uninitialized pointer in MainWindow

This commit is contained in:
csoler 2018-01-19 22:13:40 +01:00
parent 19f1a645f8
commit 6179d22ad5

View File

@ -247,15 +247,22 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
if(hiddenmode)
{
#ifdef RETROTOR
torstatus = new TorStatus();
torstatus->setVisible(Settings->valueFromGroup("StatusBar", "ShowTor", QVariant(true)).toBool());
statusBar()->addWidget(torstatus);
torstatus->getTorStatus();
#else
torstatus = NULL ;
#endif
natstatus = NULL ;
dhtstatus = NULL ;
}
else
{
torstatus = NULL ;
#ifndef RETROTOR
natstatus = new NATStatus();
if(hiddenmode) natstatus->setVisible(false);
else natstatus->setVisible(Settings->valueFromGroup("StatusBar", "ShowNAT", QVariant(true)).toBool());
@ -267,7 +274,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
else dhtstatus->setVisible(Settings->valueFromGroup("StatusBar", "ShowDHT", QVariant(true)).toBool());
statusBar()->addWidget(dhtstatus);
dhtstatus->getDHTStatus();
#endif
}
hashingstatus = new HashingStatus();
hashingstatus->setVisible(Settings->valueFromGroup("StatusBar", "ShowHashing", QVariant(true)).toBool());