diff --git a/usr.sbin/sysinst/disks.c b/usr.sbin/sysinst/disks.c index 9f9803644e10..ef71e2cbd37a 100644 --- a/usr.sbin/sysinst/disks.c +++ b/usr.sbin/sysinst/disks.c @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.4 2014/08/08 20:24:27 riz Exp $ */ +/* $NetBSD: disks.c,v 1.5 2014/08/19 13:26:27 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1383,7 +1383,7 @@ get_dkwedges(struct dkwedge_info **dkw, const char *diskdev) } } - if (dkwl.dkwl_nwedges > 0) + if (dkwl.dkwl_nwedges > 0 && *dkw != NULL) qsort(*dkw, dkwl.dkwl_nwedges, sizeof(**dkw), get_dkwedges_sort); close(fd);