From ff1f6545dba0cc2e8c9561cf10de236579d6f58c Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 15 May 2008 15:50:48 +1000 Subject: Fix support for --update=swapsuper The user of dup_super broke it. --- util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util.c') diff --git a/util.c b/util.c index 1ad6fd0..6efb88a 100644 --- a/util.c +++ b/util.c @@ -781,7 +781,8 @@ struct supertype *dup_super(struct supertype *st) for (i = 0; stnew == NULL && superlist[i] ; i++) stnew = superlist[i]->match_metadata_desc(verstr); - stnew->sb = NULL; + if (stnew) + stnew->sb = NULL; return stnew; } -- cgit