summaryrefslogtreecommitdiff
path: root/tests/tga/bug00084.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tga/bug00084.c')
-rw-r--r--tests/tga/bug00084.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/tga/bug00084.c b/tests/tga/bug00084.c
index 7d4ca92..3cf0710 100644
--- a/tests/tga/bug00084.c
+++ b/tests/tga/bug00084.c
@@ -7,7 +7,13 @@ int main()
{
gdImagePtr im;
FILE *fp = gdTestFileOpen("tga/bug00084.tga");
+ if (gdTestAssert(fp == NULL)) {
+ return 1;
+ }
im = gdImageCreateFromTga(fp);
- gdImageDestroy(im);
+ fclose(fp);
+ if (gdTestAssert(im != NULL)) {
+ gdImageDestroy(im);
+ }
return 0;
}