Assert that the back-end has provided a background colour

If we're going to refer to a specific colour, it seems appropriate to
insist that it exists.
This commit is contained in:
Ben Harris
2022-12-06 13:34:27 +00:00
parent 202b7467d8
commit 69eca65ef3

View File

@ -1312,6 +1312,7 @@ float *midend_colours(midend *me, int *ncolours)
float *ret; float *ret;
ret = me->ourgame->colours(me->frontend, ncolours); ret = me->ourgame->colours(me->frontend, ncolours);
assert(*ncolours >= 1);
{ {
int i; int i;