[GRASS-SVN] r73521 - grass/branches/releasebranch_7_6/lib/segment

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 11 12:56:13 PDT 2018


Author: mmetz
Date: 2018-10-11 12:56:13 -0700 (Thu, 11 Oct 2018)
New Revision: 73521

Modified:
   grass/branches/releasebranch_7_6/lib/segment/flush.c
Log:
libsegment: fix for all-in-memory cache (backport trunk r73516)

Modified: grass/branches/releasebranch_7_6/lib/segment/flush.c
===================================================================
--- grass/branches/releasebranch_7_6/lib/segment/flush.c	2018-10-11 09:24:22 UTC (rev 73520)
+++ grass/branches/releasebranch_7_6/lib/segment/flush.c	2018-10-11 19:56:13 UTC (rev 73521)
@@ -33,9 +33,11 @@
 {
     int i;
 
-    for (i = 0; i < SEG->nseg; i++)
-	if (SEG->scb[i].n >= 0 && SEG->scb[i].dirty)
-	    seg_pageout(SEG, i);
+    if (SEG->scb) {
+	for (i = 0; i < SEG->nseg; i++)
+	    if (SEG->scb[i].n >= 0 && SEG->scb[i].dirty)
+		seg_pageout(SEG, i);
+    }
 
     return 0;
 }



More information about the grass-commit mailing list