Debug( LDAP_DEBUG_TRACE, "=> index_entry_%s( %ld, \"%s\" )\n",
                opid == SLAP_INDEX_DELETE_OP ? "del" : "add",
-               (long) e->e_id, e->e_dn );
+               (long) e->e_id, e->e_dn ? e->e_dn : "" );
 
        /* add each attribute to the indexes */
        for ( ; ap != NULL; ap = ap->a_next ) {
 
        Debug( LDAP_DEBUG_TRACE, "<= index_entry_%s( %ld, \"%s\" ) success\n",
                opid == SLAP_INDEX_DELETE_OP ? "del" : "add",
-               (long) e->e_id, e->e_dn );
+               (long) e->e_id, e->e_dn ? e->e_dn : "" );
 
        return LDAP_SUCCESS;
 }
 
         */
 
        Debug( LDAP_DEBUG_TRACE,
-               "=> " LDAP_XSTRING(mdb_tool_entry_reindex) "( %ld, \"%s\" )\n",
-               (long) id, e->e_dn, 0 );
+               "=> " LDAP_XSTRING(mdb_tool_entry_reindex) "( %ld )\n",
+               (long) id, 0, 0 );
 
        op.o_hdr = &ohdr;
        op.o_bd = be;