diff --git a/sys/geom/sched/g_sched.c b/sys/geom/sched/g_sched.c index f3b26658f48..39c866bc1c5 100644 --- a/sys/geom/sched/g_sched.c +++ b/sys/geom/sched/g_sched.c @@ -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); }