From: Luke Howard Date: Tue, 19 Jul 2005 08:40:26 +0000 (+0000) Subject: Check op->o_bd != NULL X-Git-Tag: OPENLDAP_AC_BP~334 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0acd5d97bd19290ed50329d1a48a4564b3f104bb;p=openldap Check op->o_bd != NULL --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 950c2f55be..8734fed4ce 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -1751,17 +1751,20 @@ int backend_operational( ap = &(*ap)->a_next; } - /* Let the overlays have a chance at this */ - be_orig = op->o_bd; - if ( SLAP_ISOVERLAY( be_orig ) ) - op->o_bd = select_backend( be_orig->be_nsuffix, 0, 0 ); - - if ( ( SLAP_OPATTRS( rs->sr_attr_flags ) || rs->sr_attrs ) && - op->o_bd && op->o_bd->be_operational != NULL ) + if ( op->o_bd != NULL ) { - rc = op->o_bd->be_operational( op, rs ); + /* Let the overlays have a chance at this */ + be_orig = op->o_bd; + if ( SLAP_ISOVERLAY( be_orig ) ) + op->o_bd = select_backend( be_orig->be_nsuffix, 0, 0 ); + + if ( ( SLAP_OPATTRS( rs->sr_attr_flags ) || rs->sr_attrs ) && + op->o_bd && op->o_bd->be_operational != NULL ) + { + rc = op->o_bd->be_operational( op, rs ); + } + op->o_bd = be_orig; } - op->o_bd = be_orig; return rc; }