summaryrefslogtreecommitdiff
path: root/src/fr-command-cpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fr-command-cpio.c')
-rw-r--r--src/fr-command-cpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fr-command-cpio.c b/src/fr-command-cpio.c
index 6cbe61d..457de72 100644
--- a/src/fr-command-cpio.c
+++ b/src/fr-command-cpio.c
@@ -66,7 +66,7 @@ mktime_from_string (char *month,
tm.tm_mday = atoi (mday);
if (strchr (year, ':') != NULL) {
char **fields = g_strsplit (year, ":", 2);
- if (n_fields (fields) == 2) {
+ if ((fields != NULL) && (g_strv_length (fields) == 2)) {
time_t now;
struct tm *now_tm;