No segfault when closing SettingsDlg if no remote is selected
authorJari Jarvi <t7jaja00@students.oamk.fi>
Tue, 6 Jul 2010 11:45:35 +0000 (14:45 +0300)
committerJari Jarvi <t7jaja00@students.oamk.fi>
Tue, 6 Jul 2010 11:46:21 +0000 (14:46 +0300)
src/settingsdlg.cpp

index 753edcf..535a4d0 100644 (file)
@@ -15,7 +15,7 @@
 
 SettingsDlg::SettingsDlg(QWidget *parent)
     : QDialog(parent)
-    , m_busy(true)
+    , m_netConfMan(NULL)
 {
     QSettings settings(this);
     m_layout = new QVBoxLayout(this);
@@ -66,10 +66,12 @@ SettingsDlg::SettingsDlg(QWidget *parent)
 
     QString selectedRemote = settings.value("remoteName", "").toString();
     if (selectedRemote == "") {
+        setBusy(false);
         m_remoteNameLabel->setText(tr("No remote selected"));
         enableRateBtns(false);
     } else {
         // Create remote by name and update it's info if online
+        setBusy(true);
         m_remote = Remote(selectedRemote);
         connect(&m_remote, SIGNAL(infoUpdated()),
                 this, SLOT(updateRemoteInfo()));