Add miniobj check

Motivated by #18, but does not fix the root cause yet

For the call path in the bug ticket, the stack regionlist is supposed
to be big enough and the root cause is that it is not. But at any
rate, for that call path, the regionlist is OK to be NULL and
regionlist_add() should never be called.

If, however, it _is_ called, the regionlist can't be NULL.
parent b7b26499
......@@ -207,6 +207,7 @@ regionlist_add(struct regionlist *rl,
struct regl *regl;
unsigned av, nn;
CHECK_OBJ_NOTNULL(rl, REGIONLIST_MAGIC);
regl = VSTAILQ_LAST(&rl->head, regl, list);
CHECK_OBJ_NOTNULL(regl, REGL_MAGIC);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment