diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gdisp/image.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gdisp/image.c b/src/gdisp/image.c index fec05147..efeb6ad1 100644 --- a/src/gdisp/image.c +++ b/src/gdisp/image.c @@ -184,6 +184,14 @@ void gdispImageClose(gdispImage *img) { img->fns->close(img); else img->io.fns->close(&img->io); + img->type = GDISP_IMAGE_TYPE_UNKNOWN; + img->flags = 0; + img->fns = 0; + img->priv = 0; +} + +bool_t gdispImageIsOpen(gdispImage *img) { + return img->type != GDISP_IMAGE_TYPE_UNKNOWN && img->fns != 0; } void gdispImageSetBgColor(gdispImage *img, color_t bgcolor) { |