diff --git a/lib/vfs/gc.c b/lib/vfs/gc.c index f6c9f6a16..6936e2865 100644 --- a/lib/vfs/gc.c +++ b/lib/vfs/gc.c @@ -127,7 +127,7 @@ vfs_stamp_compare (gconstpointer a, gconstpointer b) const struct vfs_stamping *vsa = (const struct vfs_stamping *) a; const struct vfs_stamping *vsb = (const struct vfs_stamping *) b; - return (vsa->v == vsb->v && vsa->id == vsb->id) ? 0 : 1; + return (vsa == NULL || vsb == NULL || (vsa->v == vsb->v && vsa->id == vsb->id)) ? 0 : 1; } /* --------------------------------------------------------------------------------------------- */ @@ -163,7 +163,7 @@ vfs_stamp (struct vfs_class *v, vfsid id) gboolean ret = FALSE; stamp = g_slist_find_custom (stamps, &what, vfs_stamp_compare); - if (stamp != NULL) + if (stamp != NULL && stamp->data != NULL) { gettimeofday (&(VFS_STAMPING (stamp->data)->time), NULL); ret = TRUE;