[PC-BSD Commits] r4064 - pcbsd/trunk-current/kcmPBSystem

svn at pcbsd.org svn at pcbsd.org
Mon Jun 8 13:49:15 PDT 2009


Author: kris
Date: 2009-06-08 13:49:14 -0700 (Mon, 08 Jun 2009)
New Revision: 4064

Modified:
   pcbsd/trunk-current/kcmPBSystem/portsnapprogress.cpp
Log:

Add portsnap crash fix to trunk-current as well



Modified: pcbsd/trunk-current/kcmPBSystem/portsnapprogress.cpp
===================================================================
--- pcbsd/trunk-current/kcmPBSystem/portsnapprogress.cpp	2009-06-08 20:38:47 UTC (rev 4063)
+++ pcbsd/trunk-current/kcmPBSystem/portsnapprogress.cpp	2009-06-08 20:49:14 UTC (rev 4064)
@@ -110,13 +110,16 @@
     }
     else {
 	displayString += output;
-	QStringList outputSplit = QStringList::split(" ", output);
-        bool ok;
-	outputSplit[1].toInt(&ok);
-	if (ok)
-	{
+        if ( output.indexOf(" ") != -1)
+        {
+	  QStringList outputSplit = QStringList::split(" ", output);
+          bool ok;
+	  outputSplit[1].toInt(&ok);
+	  if (ok)
+	  {
 	    numberSteps += outputSplit[1].toInt();
-	}
+	  }
+        }
 	//Detect 'fetching n patches' condition
 	if ((output.find("patches") != -1) && (output.find("Applying") == -1)) {
 	    taskProgress->setTotalSteps(numberSteps);
@@ -132,6 +135,7 @@
 	taskProgress->setProgress(0);
 	
     }
+    
 }
 
 



More information about the Commits mailing list