# HG changeset patch
# User Chris Cannam
# Date 1321551498 0
# Node ID 49bddabad719168320e75279c78aef9bd93a9ef7
# Parent  b80d28f2f456ad35223cad4ca1b9279bf8edd720
Fix to prior commit

diff -r b80d28f2f456 -r 49bddabad719 src/mainwindow.cpp
--- a/src/mainwindow.cpp	Thu Nov 17 17:35:02 2011 +0000
+++ b/src/mainwindow.cpp	Thu Nov 17 17:38:18 2011 +0000
@@ -1336,9 +1336,8 @@
     if (hgrc.exists()) {
         QSettings s(hgrc.canonicalFilePath(), QSettings::IniFormat);
         s.beginGroup("web");
-        if (s.contains("port")) {
-            port = s.value("port").toInt();
-        }
+        int p = s.value("port").toInt();
+        if (p) port = p;
     }
 
     QTextStream ts(&msg);