More argument validation.

--HG--
branch : HEAD
diff --git a/lib/zip_error.c b/lib/zip_error.c
index b8d907a..d82875a 100644
--- a/lib/zip_error.c
+++ b/lib/zip_error.c
@@ -42,6 +42,9 @@
 void
 _zip_error_clear(struct zip_error *err)
 {
+    if (err == NULL)
+	return;
+
     err->zip_err = ZIP_ER_OK;
     err->sys_err = 0;
 }