Fossil SCM
Fix a bug in the graph display that causes an assertion fault if the timeline contains a node that has no parents.
Commit
c5f3e87bb0e1198ac37a7d09b4202de86eebb838
Parent
d89fea6a1c0823a…
1 file changed
+2
-2
+2
-2
| --- src/graph.c | ||
| +++ src/graph.c | ||
| @@ -207,13 +207,13 @@ | ||
| 207 | 207 | |
| 208 | 208 | /* Identify rows where the primary parent is off screen. Assign |
| 209 | 209 | ** each to a rail and draw descenders to the bottom of the screen. |
| 210 | 210 | */ |
| 211 | 211 | for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 212 | - if( pRow->nParent>0 && !bag_find(&allRids,pRow->aParent[0]) ){ | |
| 212 | + if( pRow->nParent==0 || !bag_find(&allRids,pRow->aParent[0]) ){ | |
| 213 | 213 | pRow->iRail = ++p->mxRail; |
| 214 | - pRow->bDescender = 1; | |
| 214 | + pRow->bDescender = pRow->nParent>0; | |
| 215 | 215 | mask = 1<<(pRow->iRail); |
| 216 | 216 | for(pDesc=pRow; pDesc; pDesc=pDesc->pNext){ |
| 217 | 217 | pDesc->railInUse |= mask; |
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 |
| --- src/graph.c | |
| +++ src/graph.c | |
| @@ -207,13 +207,13 @@ | |
| 207 | |
| 208 | /* Identify rows where the primary parent is off screen. Assign |
| 209 | ** each to a rail and draw descenders to the bottom of the screen. |
| 210 | */ |
| 211 | for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 212 | if( pRow->nParent>0 && !bag_find(&allRids,pRow->aParent[0]) ){ |
| 213 | pRow->iRail = ++p->mxRail; |
| 214 | pRow->bDescender = 1; |
| 215 | mask = 1<<(pRow->iRail); |
| 216 | for(pDesc=pRow; pDesc; pDesc=pDesc->pNext){ |
| 217 | pDesc->railInUse |= mask; |
| 218 | } |
| 219 | } |
| 220 |
| --- src/graph.c | |
| +++ src/graph.c | |
| @@ -207,13 +207,13 @@ | |
| 207 | |
| 208 | /* Identify rows where the primary parent is off screen. Assign |
| 209 | ** each to a rail and draw descenders to the bottom of the screen. |
| 210 | */ |
| 211 | for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 212 | if( pRow->nParent==0 || !bag_find(&allRids,pRow->aParent[0]) ){ |
| 213 | pRow->iRail = ++p->mxRail; |
| 214 | pRow->bDescender = pRow->nParent>0; |
| 215 | mask = 1<<(pRow->iRail); |
| 216 | for(pDesc=pRow; pDesc; pDesc=pDesc->pNext){ |
| 217 | pDesc->railInUse |= mask; |
| 218 | } |
| 219 | } |
| 220 |