@@ -220,11 +220,12 @@ return ret; } - close { - fclose(fp); + if (fp != NULL) + fclose(fp); fp = NULL; return self; } @end