Add assertions
This commit is contained in:
parent
585f8e836b
commit
1d09002720
|
@ -417,6 +417,8 @@ ListIterator* _glIteratorNext(ListIterator* it) {
|
||||||
_Bool retry = 1;
|
_Bool retry = 1;
|
||||||
while(retry) {
|
while(retry) {
|
||||||
retry = 0;
|
retry = 0;
|
||||||
|
assert(it);
|
||||||
|
assert(it->src);
|
||||||
|
|
||||||
_Bool is_header = !isVertex(it->src);
|
_Bool is_header = !isVertex(it->src);
|
||||||
|
|
||||||
|
@ -480,6 +482,9 @@ ListIterator* _glIteratorNext(ListIterator* it) {
|
||||||
* 3. It was not the last triangle in the strip, so we just
|
* 3. It was not the last triangle in the strip, so we just
|
||||||
* go around again to shift the next vertex (we don't return
|
* go around again to shift the next vertex (we don't return
|
||||||
* anything because it's invisible...) */
|
* anything because it's invisible...) */
|
||||||
|
assert(it);
|
||||||
|
assert(it->src);
|
||||||
|
|
||||||
if(!it->remaining) {
|
if(!it->remaining) {
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if(!isVertex(it->src)) {
|
} else if(!isVertex(it->src)) {
|
||||||
|
@ -494,6 +499,8 @@ ListIterator* _glIteratorNext(ListIterator* it) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(0 && "Fell threw!");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user