viced: avoid crash if missing volume header
[openafs.git] / src / viced / afsfileprocs.c
index 69aff57..7702c6a 100644 (file)
@@ -244,7 +244,7 @@ SetVolumeSync(struct AFSVolSync *async, Volume * avol)
     FS_LOCK;
     /* date volume instance was created */
     if (async) {
-       if (avol)
+       if (avol && avol->header)
            async->spare1 = avol->header->diskstuff.creationDate;
        else
            async->spare1 = 0;