diff options
Diffstat (limited to 'libdimension/canvas.c')
-rw-r--r-- | libdimension/canvas.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libdimension/canvas.c b/libdimension/canvas.c index 2bcc502..8671402 100644 --- a/libdimension/canvas.c +++ b/libdimension/canvas.c @@ -72,6 +72,7 @@ dmnsn_canvas_set_pixel(dmnsn_canvas *canvas, size_t x, size_t y, { dmnsn_assert(x < canvas->width && y < canvas->height, "Canvas access out of bounds."); + dmnsn_assert(!dmnsn_tcolor_isnan(tcolor), "Pixel has NaN component."); /* Set the pixel */ canvas->pixels[y*canvas->width + x] = tcolor; |