From 818ae965afad37216d804aa630359d875794612e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 19 Jun 2005 13:29:07 +0000 Subject: [PATCH] r7759: allow ldb_errstring() to be used when not connected --- source/lib/ldb/common/ldb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/lib/ldb/common/ldb.c b/source/lib/ldb/common/ldb.c index d2dbac95eaf..450fa75d8e5 100644 --- a/source/lib/ldb/common/ldb.c +++ b/source/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); }