[Kst] branches/kst/1.2/kst/kst

George Staikos staikos at kde.org
Tue Mar 14 02:57:20 CET 2006


SVN commit 518423 by staikos:

Backport assertion failure fix


 M  +9 -3      kstpsd.cpp  


--- branches/kst/1.2/kst/kst/kstpsd.cpp #518422:518423
@@ -26,6 +26,7 @@
 
 #include <kglobal.h>
 #include <klocale.h>
+#include "ksdebug.h"
 
 #include "dialoglauncher.h"
 #include "kstdatacollection.h"
@@ -335,12 +336,17 @@
     --n_subsets;
   }
 
+  // Don't touch _last_n_new if !xUpdated since it will certainly be wrong.
+  if (!xUpdated && !force) {
+    return setLastUpdateResult(NO_CHANGE);
+  }
+
   _last_n_new += iv->numNew();
   assert(_last_n_new >= 0);
 
-  if ((!xUpdated || (_last_n_new < _PSDLen/16 &&
-          n_subsets - _last_n_subsets < 1 &&
-          iv->length() != iv->numNew())) && !force) {
+  if ((_last_n_new < _PSDLen/16 &&
+        n_subsets - _last_n_subsets < 1 &&
+        iv->length() != iv->numNew()) && !force) {
     return setLastUpdateResult(NO_CHANGE);
   }
 


More information about the Kst mailing list