Check that gsp is not NULL before access. It can be NULL

for some cases.

Approved by:	kib (mentor)
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2010-08-03 11:21:17 +00:00
parent ac708fddbf
commit d02dc4cd41

@ -1906,7 +1906,7 @@ g_sched_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp,
if (indent == NULL) { /* plaintext */
sbuf_printf(sb, " algo %s", gsp ? gsp->gs_name : "--");
}
if (gsp->gs_dumpconf)
if (gsp != NULL && gsp->gs_dumpconf)
gsp->gs_dumpconf(sb, indent, gp, cp, pp);
}