summaryrefslogtreecommitdiff
path: root/ext/zip/lib/zip_file_error_clear.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zip/lib/zip_file_error_clear.c')
-rw-r--r--ext/zip/lib/zip_file_error_clear.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/zip/lib/zip_file_error_clear.c b/ext/zip/lib/zip_file_error_clear.c
index 6c9c2a02b3..ce8b6cbd94 100644
--- a/ext/zip/lib/zip_file_error_clear.c
+++ b/ext/zip/lib/zip_file_error_clear.c
@@ -37,8 +37,11 @@
-ZIP_EXTERN(void)
+ZIP_EXTERN void
zip_file_error_clear(struct zip_file *zf)
{
+ if (zf == NULL)
+ return;
+
_zip_error_clear(&zf->error);
}