Index: branches/chucko/i386/libsaio/disk.c =================================================================== --- branches/chucko/i386/libsaio/disk.c (revision 2441) +++ branches/chucko/i386/libsaio/disk.c (revision 2442) @@ -749,7 +749,7 @@ (*bvr->bv_free)(bvr); bvr = NULL; } - if ( readBootSector( biosdev, blkoff, (void *)0x7e00 ) == 0 ) { + else if ( readBootSector( biosdev, blkoff, (void *)0x7e00 ) == 0 ) { bvr->flags |= kBVFlagBootable; } } else if ( readBootSector( biosdev, blkoff, (void *)0x7e00 ) == 0 ) { @@ -1023,7 +1023,7 @@ * an Apple partition map elsewhere. */ #if UNUSED - if (map->bvrcnt == 0) + if (map && map->bvrcnt == 0) { static struct fdisk_part cdpart; cdpart.systid = 0xCD; @@ -1047,7 +1047,8 @@ } #endif // Actually this should always be true given the above code - if(map == gDiskBVMap) + // (unless malloc failed above) + if(map && map == gDiskBVMap) { // Don't leave a null map in the chain if(map->bvrcnt == 0 && map->bvr == NULL)