summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r--source4/lib/ldb/common/ldb.c3
1 files changed, 3 insertions, 0 deletions
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);
}