From 1601b8e9f9eecd59f82a2a18cd87438be41c611b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 19 Jun 2005 13:29:07 +0000 Subject: r7759: allow ldb_errstring() to be used when not connected (This used to be commit 818ae965afad37216d804aa630359d875794612e) --- source4/lib/ldb/common/ldb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index d2dbac95ea..450fa75d8e 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -172,6 +172,9 @@ int ldb_rename(struct ldb_context *ldb, const char *olddn, const char *newdn) */ const char *ldb_errstring(struct ldb_context *ldb) { + if (ldb->modules == NULL) { + return "ldb not connected"; + } return ldb->modules->ops->errstring(ldb->modules); } -- cgit