aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contactList.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/contactList.c b/contactList.c
index b40f3d4..7dadf41 100644
--- a/contactList.c
+++ b/contactList.c
@@ -187,8 +187,15 @@ int fillContactList(const char* filename) {
}
}
}
+
fclose(file);
+#ifdef DEBUG
+ if( nbContacts == 0 ) {
+ fprintf(stderr, "contact file empty");
+ return 10;
+ }
+#endif
return 0;
}