Fossil SCM
Prevent a segfault in the graph computation due to time skew. The graph is still not drawn right, but at least it displays something now.
Commit
ff9efe3026083212cab3c901a3d46da9004d3319
Parent
2f22c476c151aad…
1 file changed
+6
-1
+6
-1
| --- src/graph.c | ||
| +++ src/graph.c | ||
| @@ -229,11 +229,16 @@ | ||
| 229 | 229 | if( pRow->iRail>=0 ) continue; |
| 230 | 230 | assert( pRow->nParent>0 ); |
| 231 | 231 | parentRid = pRow->aParent[0]; |
| 232 | 232 | assert( bag_find(&allRids, parentRid) ); |
| 233 | 233 | for(pDesc=pRow->pNext; pDesc && pDesc->rid!=parentRid; pDesc=pDesc->pNext){} |
| 234 | - assert( pDesc!=0 ); | |
| 234 | + if( pDesc==0 ){ | |
| 235 | + /* Time skew */ | |
| 236 | + pRow->iRail = ++p->mxRail; | |
| 237 | + pRow->railInUse = 1<<pRow->iRail; | |
| 238 | + continue; | |
| 239 | + } | |
| 235 | 240 | if( pDesc->aiRaiser[pDesc->iRail]==0 && pDesc->zBranch==pRow->zBranch ){ |
| 236 | 241 | pRow->iRail = pDesc->iRail; |
| 237 | 242 | }else{ |
| 238 | 243 | pRow->iRail = findFreeRail(p, 0, pDesc->idx, inUse); |
| 239 | 244 | } |
| 240 | 245 |
| --- src/graph.c | |
| +++ src/graph.c | |
| @@ -229,11 +229,16 @@ | |
| 229 | if( pRow->iRail>=0 ) continue; |
| 230 | assert( pRow->nParent>0 ); |
| 231 | parentRid = pRow->aParent[0]; |
| 232 | assert( bag_find(&allRids, parentRid) ); |
| 233 | for(pDesc=pRow->pNext; pDesc && pDesc->rid!=parentRid; pDesc=pDesc->pNext){} |
| 234 | assert( pDesc!=0 ); |
| 235 | if( pDesc->aiRaiser[pDesc->iRail]==0 && pDesc->zBranch==pRow->zBranch ){ |
| 236 | pRow->iRail = pDesc->iRail; |
| 237 | }else{ |
| 238 | pRow->iRail = findFreeRail(p, 0, pDesc->idx, inUse); |
| 239 | } |
| 240 |
| --- src/graph.c | |
| +++ src/graph.c | |
| @@ -229,11 +229,16 @@ | |
| 229 | if( pRow->iRail>=0 ) continue; |
| 230 | assert( pRow->nParent>0 ); |
| 231 | parentRid = pRow->aParent[0]; |
| 232 | assert( bag_find(&allRids, parentRid) ); |
| 233 | for(pDesc=pRow->pNext; pDesc && pDesc->rid!=parentRid; pDesc=pDesc->pNext){} |
| 234 | if( pDesc==0 ){ |
| 235 | /* Time skew */ |
| 236 | pRow->iRail = ++p->mxRail; |
| 237 | pRow->railInUse = 1<<pRow->iRail; |
| 238 | continue; |
| 239 | } |
| 240 | if( pDesc->aiRaiser[pDesc->iRail]==0 && pDesc->zBranch==pRow->zBranch ){ |
| 241 | pRow->iRail = pDesc->iRail; |
| 242 | }else{ |
| 243 | pRow->iRail = findFreeRail(p, 0, pDesc->idx, inUse); |
| 244 | } |
| 245 |