From 35650b13e506f0df1a03b66747b9e1514640a2cc Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 6 Oct 2021 18:35:33 +0300 Subject: Media: Print error message from stb_image --- src/media.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/media.c') diff --git a/src/media.c b/src/media.c index 636cd91f..26f0af4b 100644 --- a/src/media.c +++ b/src/media.c @@ -144,6 +144,9 @@ void makeTexture_GmImage(iGmImage *d) { else { imgData = stbi_load_from_memory( constData_Block(data), size_Block(data), &d->size.x, &d->size.y, NULL, 4); + if (!imgData) { + fprintf(stderr, "[media] image load failed: %s\n", stbi_failure_reason()); + } } if (!imgData) { d->size = zero_I2(); -- cgit v1.2.3